Fix bug in special_notify(). Reproducable crash on win32 after exactly 40 flips or mirrors. Was (probably) corrupting an element in SDL_Surface *undo_bufs[].

This commit is contained in:
John Popplewell 2007-12-25 00:22:02 +00:00
parent e6b0b3ab8c
commit f8fe5eeea0

View file

@ -17019,7 +17019,8 @@ void special_notify(int flags)
{ {
int tmp_int; int tmp_int;
tmp_int = (cur_undo - 1) % NUM_UNDO_BUFS; tmp_int = cur_undo - 1;
if (tmp_int < 0) tmp_int = NUM_UNDO_BUFS - 1;
if (flags & SPECIAL_MIRROR) if (flags & SPECIAL_MIRROR)
{ {