1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
diff -up quake3-1.36/code/botlib/l_precomp.c~ quake3-1.36/code/botlib/l_precomp.c
--- quake3-1.36/code/botlib/l_precomp.c~ 2009-04-27 08:42:37.000000000 +0200
+++ quake3-1.36/code/botlib/l_precomp.c 2009-11-03 21:03:08.000000000 +0100
@@ -948,7 +948,7 @@ void PC_ConvertPath(char *path)
if ((*ptr == '\\' || *ptr == '/') &&
(*(ptr+1) == '\\' || *(ptr+1) == '/'))
{
- strcpy(ptr, ptr+1);
+ memmove(ptr, ptr+1, strlen(ptr));
} //end if
else
{
diff -up quake3-1.36/code/botlib/l_script.c~ quake3-1.36/code/botlib/l_script.c
--- quake3-1.36/code/botlib/l_script.c~ 2009-04-27 08:42:37.000000000 +0200
+++ quake3-1.36/code/botlib/l_script.c 2009-11-03 21:06:11.000000000 +0100
@@ -1118,7 +1118,7 @@ void StripDoubleQuotes(char *string)
{
if (*string == '\"')
{
- strcpy(string, string+1);
+ memmove(string, string+1, strlen(string));
} //end if
if (string[strlen(string)-1] == '\"')
{
@@ -1135,7 +1135,7 @@ void StripSingleQuotes(char *string)
{
if (*string == '\'')
{
- strcpy(string, string+1);
+ memmove(string, string+1, strlen(string));
} //end if
if (string[strlen(string)-1] == '\'')
{
|