aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lbaselib.c b/lbaselib.c
index f3b0a577..40caaa94 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.308 2014/12/08 15:26:55 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.309 2014/12/10 12:26:42 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*/
@@ -55,7 +55,7 @@ static const char *b_str2int (const char *s, int base, lua_Integer *pn) {
55 return NULL; 55 return NULL;
56 do { 56 do {
57 int digit = (isdigit((unsigned char)*s)) ? *s - '0' 57 int digit = (isdigit((unsigned char)*s)) ? *s - '0'
58 : toupper((unsigned char)*s) - 'A' + 10; 58 : (toupper((unsigned char)*s) - 'A') + 10;
59 if (digit >= base) return NULL; /* invalid numeral */ 59 if (digit >= base) return NULL; /* invalid numeral */
60 n = n * base + digit; 60 n = n * base + digit;
61 s++; 61 s++;