mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-19 01:52:35 -05:00
puzzles: add more parameter validation checks
Fixes some annoying crashes. Change-Id: If3c293bd90e301c3e697d1e5fcb1b0aa2ea320fb
This commit is contained in:
parent
c78ff7f615
commit
f31a400bac
7 changed files with 15 additions and 2 deletions
|
|
@ -320,6 +320,8 @@ static char *validate_params(const game_params *params, int full)
|
|||
return "Barrier probability may not be negative";
|
||||
if (params->barrier_probability > 1)
|
||||
return "Barrier probability may not be greater than 1";
|
||||
if (params->movetarget < 0)
|
||||
return "Number of shuffling moves may not be negative";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue