fix gamedetect NULL pointer
This commit is contained in:
parent
21f19dbd91
commit
61c6265531
|
|
@ -88,10 +88,13 @@ bool gamedetect_check_game(char *gamefile, const char *checkfile1, const char *c
|
||||||
if(!file_exists(buf))
|
if(!file_exists(buf))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
strcpy(buf + bufpos + 1, checkfile2);
|
if(checkfile2)
|
||||||
globalOutputStream() << "Checking for a game file in " << buf << "\n";
|
{
|
||||||
if(!file_exists(buf))
|
strcpy(buf + bufpos + 1, checkfile2);
|
||||||
return false;
|
globalOutputStream() << "Checking for a game file in " << buf << "\n";
|
||||||
|
if(!file_exists(buf))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
buf[bufpos + 1] = 0;
|
buf[bufpos + 1] = 0;
|
||||||
gamedetect_found_game(gamefile, buf);
|
gamedetect_found_game(gamefile, buf);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user