comparison include/SDL_stdinc.h @ 3234:f8c02d0560d5

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:10 +0000
parents bcd41b269091
children 470d0a416aa7
comparison
equal deleted inserted replaced
3233:91eaef1c9cfe 3234:f8c02d0560d5
317 do { \ 317 do { \
318 unsigned _count = (len); \ 318 unsigned _count = (len); \
319 unsigned _n = (_count + 3) / 4; \ 319 unsigned _n = (_count + 3) / 4; \
320 Uint32 *_p = SDL_static_cast(Uint32 *, dst); \ 320 Uint32 *_p = SDL_static_cast(Uint32 *, dst); \
321 Uint32 _val = (val); \ 321 Uint32 _val = (val); \
322 if (len == 0) break; \
322 switch (_count % 4) { \ 323 switch (_count % 4) { \
323 case 0: do { *_p++ = _val; \ 324 case 0: do { *_p++ = _val; \
324 case 3: *_p++ = _val; \ 325 case 3: *_p++ = _val; \
325 case 2: *_p++ = _val; \ 326 case 2: *_p++ = _val; \
326 case 1: *_p++ = _val; \ 327 case 1: *_p++ = _val; \