aboutsummaryrefslogtreecommitdiff
path: root/lobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'lobject.c')
-rw-r--r--lobject.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lobject.c b/lobject.c
index fd81f73b..7b118602 100644
--- a/lobject.c
+++ b/lobject.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.c,v 2.49 2011/05/31 18:24:36 roberto Exp roberto $ 2** $Id: lobject.c,v 2.50 2011/06/16 14:13:22 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*/
@@ -86,8 +86,7 @@ lua_Number luaO_arith (int op, lua_Number v1, lua_Number v2) {
86 86
87int luaO_hexavalue (int c) { 87int luaO_hexavalue (int c) {
88 if (lisdigit(c)) return c - '0'; 88 if (lisdigit(c)) return c - '0';
89 else if (lisupper(c)) return c - 'A' + 10; 89 else return ltoupper(c) - 'A' + 10;
90 else return c - 'a' + 10;
91} 90}
92 91
93 92