Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed crash if the gesture coordinates go negative - FIXME: Should th…
Browse files Browse the repository at this point in the history
…is protection be at a lower level?
  • Loading branch information
slouken committed Dec 1, 2010
1 parent bc4010d commit 00dae1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/testgesture.c
Expand Up @@ -81,8 +81,8 @@ void setpix(SDL_Surface *screen, float _x, float _y, unsigned int col)
int y = (int)_y;
float a;

if(x > screen->w) return;
if(y > screen->h) return;
if(x < 0 || x > screen->w) return;
if(y < 0 || y > screen->h) return;

pixmem32 = (Uint32*) screen->pixels + y*screen->pitch/BPP + x;

Expand Down

0 comments on commit 00dae1d

Please sign in to comment.