aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lvm.c b/lvm.c
index 89ef8997..2719bb20 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.220 2014/07/21 16:02:10 roberto Exp roberto $ 2** $Id: lvm.c,v 2.221 2014/07/30 14:00:14 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -66,7 +66,7 @@ int luaV_tonumber_ (const TValue *obj, lua_Number *n) {
66 *n = fltvalue(obj); 66 *n = fltvalue(obj);
67 return 1; 67 return 1;
68 } 68 }
69 else if (ttisstring(obj) && /* string convertible to number? */ 69 else if (cvt2num(obj) && /* string convertible to number? */
70 luaO_str2num(svalue(obj), &v) == tsvalue(obj)->len + 1) { 70 luaO_str2num(svalue(obj), &v) == tsvalue(obj)->len + 1) {
71 obj = &v; 71 obj = &v;
72 goto again; /* convert result from 'luaO_str2num' to a float */ 72 goto again; /* convert result from 'luaO_str2num' to a float */
@@ -98,7 +98,7 @@ static int tointeger_aux (const TValue *obj, lua_Integer *p, int mode) {
98 *p = ivalue(obj); 98 *p = ivalue(obj);
99 return 1; 99 return 1;
100 } 100 }
101 else if (ttisstring(obj) && 101 else if (cvt2num(obj) &&
102 luaO_str2num(svalue(obj), &v) == tsvalue(obj)->len + 1) { 102 luaO_str2num(svalue(obj), &v) == tsvalue(obj)->len + 1) {
103 obj = &v; 103 obj = &v;
104 goto again; /* convert result from 'luaO_str2num' to an integer */ 104 goto again; /* convert result from 'luaO_str2num' to an integer */