Removed duplicate code. Changed strcpy() to memmove() in filename change because destinations can overlap.
This commit is contained in:
@@ -512,17 +512,9 @@ void GetFilename()
|
|||||||
while (*tmp!=0) tmp++;
|
while (*tmp!=0) tmp++;
|
||||||
while (*tmp!='/') tmp--;
|
while (*tmp!='/') tmp--;
|
||||||
size = (strlen(tmp)-1) & 0xFF;
|
size = (strlen(tmp)-1) & 0xFF;
|
||||||
strcpy(&fnamest, tmp);
|
memmove(&fnamest, tmp, strlen(tmp));
|
||||||
fnamest = size;
|
fnamest = size;
|
||||||
statefileloc-=(tmp-&fnamest);
|
statefileloc-=(tmp-&fnamest);
|
||||||
|
|
||||||
tmp = &fnames;
|
|
||||||
*tmp = '/';
|
|
||||||
while (*tmp!=0) tmp++;
|
|
||||||
while (*tmp!='/') tmp--;
|
|
||||||
size = (strlen(tmp)-1) & 0xFF;
|
|
||||||
strcpy(&fnames, tmp);
|
|
||||||
fnames = size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *olddir = NULL;
|
char *olddir = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user