aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lvm.c b/lvm.c
index 3eed5535..026e943d 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.203 2014/04/30 16:50:16 roberto Exp roberto $ 2** $Id: lvm.c,v 2.204 2014/04/30 19:29:51 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*/
@@ -70,7 +70,7 @@ int luaV_tonumber_ (const TValue *obj, lua_Number *n) {
70 return 1; 70 return 1;
71 } 71 }
72 else if (ttisstring(obj) && 72 else if (ttisstring(obj) &&
73 luaO_str2num(svalue(obj), tsvalue(obj)->len, &v)) { 73 luaO_str2num(svalue(obj), &v) == tsvalue(obj)->len + 1) {
74 obj = &v; 74 obj = &v;
75 goto again; /* convert result from 'luaO_str2num' to a float */ 75 goto again; /* convert result from 'luaO_str2num' to a float */
76 } 76 }
@@ -109,8 +109,8 @@ static int tointeger_aux (const TValue *obj, lua_Integer *p, int up) {
109 *p = ivalue(obj); 109 *p = ivalue(obj);
110 return 1; 110 return 1;
111 } 111 }
112 if (ttisstring(obj) && 112 else if (ttisstring(obj) &&
113 luaO_str2num(svalue(obj), tsvalue(obj)->len, &v)) { 113 luaO_str2num(svalue(obj), &v) == tsvalue(obj)->len + 1) {
114 obj = &v; 114 obj = &v;
115 goto again; /* convert result from 'luaO_str2num' to an integer */ 115 goto again; /* convert result from 'luaO_str2num' to an integer */
116 } 116 }