diff options
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.193 2014/04/10 18:24:12 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.194 2014/04/10 19:45:43 roberto Exp roberto $ |
3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1008,7 +1008,7 @@ static int dumpint (char *buff, lua_Unsigned n, int littleendian, int size) { | |||
1008 | /* OK if there are only zeros left in higher bytes, | 1008 | /* OK if there are only zeros left in higher bytes, |
1009 | or only ones left (excluding non-signal bits in last byte) */ | 1009 | or only ones left (excluding non-signal bits in last byte) */ |
1010 | return ((n & ~(lua_Integer)MC) == 0 || | 1010 | return ((n & ~(lua_Integer)MC) == 0 || |
1011 | (n | SM) == (~(lua_Unsigned)0 >> ((size - 1) * NB))); | 1011 | (n | SM) == (LUA_MAXUNSIGNED >> ((size - 1) * NB))); |
1012 | } | 1012 | } |
1013 | else return 1; /* no overflow can occur with full size */ | 1013 | else return 1; /* no overflow can occur with full size */ |
1014 | } | 1014 | } |