Fixed bug #746
authorSam Lantinga <slouken@libsdl.org>
Fri, 07 Aug 2009 10:20:10 +0000
changeset 3234f8c02d0560d5
parent 3233 91eaef1c9cfe
child 3235 d35b649858e0
Fixed bug #746

Fixed freeze when trying to memset with 0 length
include/SDL_stdinc.h
     1.1 --- a/include/SDL_stdinc.h	Fri Aug 07 09:44:40 2009 +0000
     1.2 +++ b/include/SDL_stdinc.h	Fri Aug 07 10:20:10 2009 +0000
     1.3 @@ -319,6 +319,7 @@
     1.4  	unsigned _n = (_count + 3) / 4;		\
     1.5  	Uint32 *_p = SDL_static_cast(Uint32 *, dst);		\
     1.6  	Uint32 _val = (val);			\
     1.7 +	if (len == 0) break;			\
     1.8          switch (_count % 4) {			\
     1.9          case 0: do {    *_p++ = _val;		\
    1.10          case 3:         *_p++ = _val;		\