Fixed crash if the gesture coordinates go negative - FIXME: Should this protection be at a lower level?
This commit is contained in:
parent
3d9620ed0a
commit
dc22c27aad
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue