Mercurial > sdl-ios-xcode
diff include/SDL_stdinc.h @ 4182:6512a61c2c73 SDL-1.2
Fixed bug #746
Fixed freeze when trying to memset with 0 length
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 07 Aug 2009 10:20:40 +0000 |
parents | a1b03ba2fcd0 |
children | 4c4113c2162c |
line wrap: on
line diff
--- 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; \