Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug 1764 - Integer Precision Loss During Compilation
Browse files Browse the repository at this point in the history
Phil Sampson

/Library/Frameworks/SDL2.framework/Headers/SDL_stdinc.h:345:28: Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int'
  • Loading branch information
slouken committed Mar 20, 2013
1 parent 6970497 commit abd7fe5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/SDL_stdinc.h
Expand Up @@ -342,13 +342,12 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t len)
);
/* !!! FIXME: amd64? */
#else
unsigned int _count = (len);
unsigned int _n = (_count + 3) / 4;
size_t _n = (len + 3) / 4;
Uint32 *_p = SDL_static_cast(Uint32 *, dst);
Uint32 _val = (val);
if (len == 0)
return;
switch (_count % 4)
switch (len % 4)
{
case 0: do { *_p++ = _val;
case 3: *_p++ = _val;
Expand Down

0 comments on commit abd7fe5

Please sign in to comment.