diff options
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.278 2013/07/05 14:35:49 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.279 2013/07/05 14:39:15 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -63,7 +63,7 @@ static int b_str2int (const char *s, const char *e, int base, lua_Integer *pn) { | |||
63 | s += strspn(s, SPACECHARS); /* skip trailing spaces */ | 63 | s += strspn(s, SPACECHARS); /* skip trailing spaces */ |
64 | if (s != e) /* invalid trailing characters? */ | 64 | if (s != e) /* invalid trailing characters? */ |
65 | return 0; | 65 | return 0; |
66 | *pn = (neg) ? -(lua_Integer)n : (lua_Integer)n; | 66 | *pn = (lua_Integer)((neg) ? (0u - n) : n); |
67 | return 1; | 67 | return 1; |
68 | } | 68 | } |
69 | 69 | ||