Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
4181:cc865a058a0c | 4182:6512a61c2c73 |
---|---|
257 do { \ | 257 do { \ |
258 unsigned _count = (len); \ | 258 unsigned _count = (len); \ |
259 unsigned _n = (_count + 3) / 4; \ | 259 unsigned _n = (_count + 3) / 4; \ |
260 Uint32 *_p = (Uint32 *)(dst); \ | 260 Uint32 *_p = (Uint32 *)(dst); \ |
261 Uint32 _val = (val); \ | 261 Uint32 _val = (val); \ |
262 if (len == 0) break; \ | |
262 switch (_count % 4) { \ | 263 switch (_count % 4) { \ |
263 case 0: do { *_p++ = _val; \ | 264 case 0: do { *_p++ = _val; \ |
264 case 3: *_p++ = _val; \ | 265 case 3: *_p++ = _val; \ |
265 case 2: *_p++ = _val; \ | 266 case 2: *_p++ = _val; \ |
266 case 1: *_p++ = _val; \ | 267 case 1: *_p++ = _val; \ |