Removed duplicate code. Changed strcpy() to memmove() in filename change because destinations can overlap.

This commit is contained in:
n-a-c-h
2005-07-10 20:43:06 +00:00
parent ac62471e38
commit 4ca00c7299

View File

@@ -512,17 +512,9 @@ void GetFilename()
while (*tmp!=0) tmp++;
while (*tmp!='/') tmp--;
size = (strlen(tmp)-1) & 0xFF;
strcpy(&fnamest, tmp);
memmove(&fnamest, tmp, strlen(tmp));
fnamest = size;
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;