summaryrefslogtreecommitdiff
path: root/src/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lbaselib.c')
-rw-r--r--src/lbaselib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lbaselib.c b/src/lbaselib.c
index a2403952..9a151245 100644
--- a/src/lbaselib.c
+++ b/src/lbaselib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lbaselib.c,v 1.309 2014/12/10 12:26:42 roberto Exp $
+** $Id: lbaselib.c,v 1.310 2015/03/28 19:14:47 roberto Exp $
** Basic library
** See Copyright Notice in lua.h
*/
@@ -55,7 +55,7 @@ static const char *b_str2int (const char *s, int base, lua_Integer *pn) {
return NULL;
do {
int digit = (isdigit((unsigned char)*s)) ? *s - '0'
- : toupper((unsigned char)*s) - 'A' + 10;
+ : (toupper((unsigned char)*s) - 'A') + 10;
if (digit >= base) return NULL; /* invalid numeral */
n = n * base + digit;
s++;