@@ -1,51 +0,0 @@
1−Retrieved from https://bugzilla.icculus.org/show_bug.cgi?id=4331,
2−removed path prefix.
3−
4− -- nckx <tobias.geerinckx.rice@gmail.com>
5−
6−PATCH: Bots don't work on 64 bit Intel CPU's
7−
8−botlib abuses strcpy (source and dest overlap), and the strcpy function for 64
9−bit intel CPU's in the latest glibc, does not like this causing the bots to not
10−load.
11−
12−The attached patch fixes this.
13−
14−Note this patch should be credited to: Andreas Bierfert (andreas.bierfert at
15−lowlatency.de)
16−
17−See: http://bugzilla.redhat.com/show_bug.cgi?id=526338
18−
19−diff -up quake3-1.36/code/botlib/l_precomp.c~ quake3-1.36/code/botlib/l_precomp.c
20−--- code/botlib/l_precomp.c~ 2009-04-27 08:42:37.000000000 +0200
21−+++ code/botlib/l_precomp.c 2009-11-03 21:03:08.000000000 +0100
22−@@ -948,7 +948,7 @@ void PC_ConvertPath(char *path)
23− if ((*ptr == '\\' || *ptr == '/') &&
24− (*(ptr+1) == '\\' || *(ptr+1) == '/'))
25− {
26−- strcpy(ptr, ptr+1);
27−+ memmove(ptr, ptr+1, strlen(ptr));
28− } //end if
29− else
30− {
31−diff -up quake3-1.36/code/botlib/l_script.c~ quake3-1.36/code/botlib/l_script.c
32−--- code/botlib/l_script.c~ 2009-04-27 08:42:37.000000000 +0200
33−+++ code/botlib/l_script.c 2009-11-03 21:06:11.000000000 +0100
34−@@ -1118,7 +1118,7 @@ void StripDoubleQuotes(char *string)
35− {
36− if (*string == '\"')
37− {
38−- strcpy(string, string+1);
39−+ memmove(string, string+1, strlen(string));
40− } //end if
41− if (string[strlen(string)-1] == '\"')
42− {
43−@@ -1135,7 +1135,7 @@ void StripSingleQuotes(char *string)
44− {
45− if (*string == '\'')
46− {
47−- strcpy(string, string+1);
48−+ memmove(string, string+1, strlen(string));
49− } //end if
50− if (string[strlen(string)-1] == '\'')
51− {