about summary refs log tree commit diff
path: root/pkgs/games/crafty/strcpy.patch
blob: d4d424d23dab1982302226e170091b622a4215cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/utility.c
+++ b/utility.c
@@ -2144,7 +2144,7 @@ int ReadPGN(FILE * input, int option) {
         char *skip;
 
         strcpy(temp, input_buffer);
-        skip = strstr(input_buffer, buffer) + strlen(buffer);
+        skip = strstr(temp, buffer) + strlen(buffer);
         if (skip)
           strcpy(input_buffer, skip);
       }
@@ -2241,7 +2241,7 @@ int ReadPGN(FILE * input, int option) {
             }
           }
           strcpy(temp, input_buffer);
-          skip = strstr(input_buffer, buffer) + strlen(buffer);
+          skip = strstr(temp, buffer) + strlen(buffer);
           strcpy(input_buffer, skip);
       } else {
         int skip;