# HG changeset patch # User Sam Lantinga # Date 1249640410 0 # Node ID f8c02d0560d5a980608659017ba70c197e33c49a # Parent 91eaef1c9cfef326e44c6344540a7098c3ab155d Fixed bug #746 Fixed freeze when trying to memset with 0 length diff -r 91eaef1c9cfe -r f8c02d0560d5 include/SDL_stdinc.h --- a/include/SDL_stdinc.h Fri Aug 07 09:44:40 2009 +0000 +++ b/include/SDL_stdinc.h Fri Aug 07 10:20:10 2009 +0000 @@ -319,6 +319,7 @@ unsigned _n = (_count + 3) / 4; \ Uint32 *_p = SDL_static_cast(Uint32 *, dst); \ Uint32 _val = (val); \ + if (len == 0) break; \ switch (_count % 4) { \ case 0: do { *_p++ = _val; \ case 3: *_p++ = _val; \