Fixed various save files not working correctly when loading ROM via command line. Debian: is it so hard to pass back patches?

This commit is contained in:
n-a-c-h
2005-04-30 17:15:03 +00:00
parent 3c146d61bf
commit ff38c2deb4

View File

@@ -501,27 +501,28 @@ void obtaindir()
}
}
extern char fnamest, fnames;
void GetFilename()
{
char *tmp = &fnamest;
char size;
extern char fnamest, fnames;
extern int statefileloc;
char *tmp = &fnamest;
char size;
*tmp = '/';
while (*tmp!=0) tmp++;
while (*tmp!='/') tmp--;
size = (strlen(tmp)-1) & 0xFF;
strcpy(&fnamest, tmp);
fnamest = size;
tmp = &fnames;
*tmp = '/';
while (*tmp!=0) tmp++;
while (*tmp!='/') tmp--;
size = (strlen(tmp)-1) & 0xFF;
strcpy(&fnames, tmp);
fnames = size;
*tmp = '/';
while (*tmp!=0) tmp++;
while (*tmp!='/') tmp--;
size = (strlen(tmp)-1) & 0xFF;
strcpy(&fnamest, 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;