# HG changeset patch # User Sam Lantinga # Date 1249640440 0 # Node ID 6512a61c2c73b495efe80ace249f7865df4c0ea4 # Parent cc865a058a0c1f69a14d523a4a546442af483b5a Fixed bug #746 Fixed freeze when trying to memset with 0 length diff -r cc865a058a0c -r 6512a61c2c73 include/SDL_stdinc.h --- a/include/SDL_stdinc.h Sun Aug 02 20:45:40 2009 +0000 +++ b/include/SDL_stdinc.h Fri Aug 07 10:20:40 2009 +0000 @@ -259,6 +259,7 @@ unsigned _n = (_count + 3) / 4; \ Uint32 *_p = (Uint32 *)(dst); \ Uint32 _val = (val); \ + if (len == 0) break; \ switch (_count % 4) { \ case 0: do { *_p++ = _val; \ case 3: *_p++ = _val; \