diff options
Diffstat (limited to 'lobject.c')
| -rw-r--r-- | lobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.c,v 2.85 2014/05/12 21:22:05 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 2.86 2014/05/12 21:44:17 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 | */ |
| @@ -256,7 +256,7 @@ static const char *l_str2d (const char *s, lua_Number *result) { | |||
| 256 | char *endptr; | 256 | char *endptr; |
| 257 | if (strpbrk(s, "nN")) /* reject 'inf' and 'nan' */ | 257 | if (strpbrk(s, "nN")) /* reject 'inf' and 'nan' */ |
| 258 | return NULL; | 258 | return NULL; |
| 259 | else if (strpbrk(s, "xX")) /* hexa? */ | 259 | else if (strpbrk(s, "xX")) /* hex? */ |
| 260 | *result = lua_strx2number(s, &endptr); | 260 | *result = lua_strx2number(s, &endptr); |
| 261 | else | 261 | else |
| 262 | *result = lua_str2number(s, &endptr); | 262 | *result = lua_str2number(s, &endptr); |
| @@ -273,7 +273,7 @@ static const char *l_str2int (const char *s, lua_Integer *result) { | |||
| 273 | while (lisspace(cast_uchar(*s))) s++; /* skip initial spaces */ | 273 | while (lisspace(cast_uchar(*s))) s++; /* skip initial spaces */ |
| 274 | neg = isneg(&s); | 274 | neg = isneg(&s); |
| 275 | if (s[0] == '0' && | 275 | if (s[0] == '0' && |
| 276 | (s[1] == 'x' || s[1] == 'X')) { /* hexa? */ | 276 | (s[1] == 'x' || s[1] == 'X')) { /* hex? */ |
| 277 | s += 2; /* skip '0x' */ | 277 | s += 2; /* skip '0x' */ |
| 278 | for (; lisxdigit(cast_uchar(*s)); s++) { | 278 | for (; lisxdigit(cast_uchar(*s)); s++) { |
| 279 | a = a * 16 + luaO_hexavalue(cast_uchar(*s)); | 279 | a = a * 16 + luaO_hexavalue(cast_uchar(*s)); |
