diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-06-16 11:13:22 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-06-16 11:13:22 -0300 |
| commit | cf0562e1e720581f1b5c05dc9cc55a0857c94639 (patch) | |
| tree | 31aa5a4f2233158c14d88a490ecec42a11107c5b | |
| parent | 22e1c5ebadc63f4b6aa1b2db82067151041e75c7 (diff) | |
| download | lua-cf0562e1e720581f1b5c05dc9cc55a0857c94639.tar.gz lua-cf0562e1e720581f1b5c05dc9cc55a0857c94639.tar.bz2 lua-cf0562e1e720581f1b5c05dc9cc55a0857c94639.zip | |
detail (missing cast to unsigned char when converting char to int)
| -rw-r--r-- | lobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.c,v 2.48 2011/05/03 16:01:57 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 2.49 2011/05/31 18:24:36 roberto Exp roberto $ |
| 3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -105,7 +105,7 @@ static int isneg (const char **s) { | |||
| 105 | 105 | ||
| 106 | static lua_Number readhexa (const char **s, lua_Number r, int *count) { | 106 | static lua_Number readhexa (const char **s, lua_Number r, int *count) { |
| 107 | while (lisxdigit(cast_uchar(**s))) { /* read integer part */ | 107 | while (lisxdigit(cast_uchar(**s))) { /* read integer part */ |
| 108 | r = (r * 16.0) + (double)luaO_hexavalue(*(*s)++); | 108 | r = (r * 16.0) + cast_num(luaO_hexavalue(cast_uchar(*(*s)++))); |
| 109 | (*count)++; | 109 | (*count)++; |
| 110 | } | 110 | } |
| 111 | return r; | 111 | return r; |
