diff options
| author | Jacob Nevins <jacobn@chiark.greenend.org.uk> | 2005-07-04 11:21:50 +0000 |
|---|---|---|
| committer | Jacob Nevins <jacobn@chiark.greenend.org.uk> | 2005-07-04 11:21:50 +0000 |
| commit | 5c48a594628a98f6edb5ac0fa1f0ea1b14fa27b7 (patch) | |
| tree | a90c9a171f2f1808a62e1ddb24b4ad9ff0c5b0d5 /flip.c | |
| parent | 698921762430413c329e346c7ec7b87c7b422cdc (diff) | |
| download | puzzles-5c48a594628a98f6edb5ac0fa1f0ea1b14fa27b7.zip puzzles-5c48a594628a98f6edb5ac0fa1f0ea1b14fa27b7.tar.gz puzzles-5c48a594628a98f6edb5ac0fa1f0ea1b14fa27b7.tar.bz2 puzzles-5c48a594628a98f6edb5ac0fa1f0ea1b14fa27b7.tar.xz | |
Fix bounds checking for Flip cursor control.
[originally from svn r6050]
Diffstat (limited to 'flip.c')
| -rw-r--r-- | flip.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 = ""; } |