mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Fix bounds checking for Flip cursor control.
[originally from svn r6050]
This commit is contained in:
4
flip.c
4
flip.c
@ -928,8 +928,8 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds,
|
||||
default: assert(!"shouldn't get here");
|
||||
}
|
||||
ui->cx += dx; ui->cy += dy;
|
||||
ui->cx = min(max(ui->cx, 0), state->w);
|
||||
ui->cy = min(max(ui->cy, 0), state->h);
|
||||
ui->cx = min(max(ui->cx, 0), state->w - 1);
|
||||
ui->cy = min(max(ui->cy, 0), state->h - 1);
|
||||
ui->cdraw = 1;
|
||||
nullret = "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user