1
0
Fork 0

Don't crash if dta is rubbish with findnext. change WildFilecmp to use strrchr instead of strchr. This way .. get's matched with *. Fixes Wonderland

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2213
This commit is contained in:
Peter Veenstra 2005-05-31 18:38:54 +00:00
parent 719d57bea9
commit df1b64ffad
2 changed files with 11 additions and 4 deletions

View file

@ -35,7 +35,7 @@ bool WildFileCmp(const char * file, const char * wild)
strcpy(wild_name," ");
strcpy(wild_ext," ");
find_ext=strchr(file,'.');
find_ext=strrchr(file,'.');
if (find_ext) {
Bitu size=find_ext-file;if (size>8) size=8;
memcpy(file_name,file,size);
@ -45,7 +45,7 @@ bool WildFileCmp(const char * file, const char * wild)
memcpy(file_name,file,(strlen(file) > 8) ? 8 : strlen(file));
}
upcase(file_name);upcase(file_ext);
find_ext=strchr(wild,'.');
find_ext=strrchr(wild,'.');
if (find_ext) {
Bitu size=find_ext-wild;if (size>8) size=8;
memcpy(wild_name,wild,size);