# HG changeset patch # User Sam Lantinga # Date 1291169281 28800 # Node ID 40a43c6d9220390edef3eb699b314afb851c32fa # Parent a4032241deb5270859a8165db43312961b4d7ce3 Fixed crash if the gesture coordinates go negative - FIXME: Should this protection be at a lower level? diff -r a4032241deb5 -r 40a43c6d9220 test/testgesture.c --- a/test/testgesture.c Tue Nov 30 18:07:31 2010 -0800 +++ b/test/testgesture.c Tue Nov 30 18:08:01 2010 -0800 @@ -81,8 +81,8 @@ 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;