forked from len0rd/rockbox
puzzles: fix crash when loading a corrupt save
I misread the documentation here, thinking that the pointer would be set to *point to* a null byte, not to a null pointer itself. [1] [1]: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/devel/midend.html#identify-game Change-Id: I9b76bba9b1611dfd8e05d076a69f7554b5b74c53
This commit is contained in:
parent
c02a9c5ab3
commit
7da8137bdb
1 changed files with 1 additions and 2 deletions
|
@ -3201,9 +3201,8 @@ static bool load_game(void)
|
|||
char *game;
|
||||
const char *ret = identify_game(&game, read_wrapper, (void*)fd);
|
||||
|
||||
if(!*game && ret)
|
||||
if(!game && ret)
|
||||
{
|
||||
sfree(game);
|
||||
rb->splash(HZ, ret);
|
||||
rb->close(fd);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue