aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lvm.c b/lvm.c
index c0a10d6c..c9729bcc 100644
--- a/lvm.c
+++ b/lvm.c
@@ -568,8 +568,13 @@ int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2) {
568 if (ttype(t1) != ttype(t2) || ttype(t1) != LUA_TNUMBER) 568 if (ttype(t1) != ttype(t2) || ttype(t1) != LUA_TNUMBER)
569 return 0; /* only numbers can be equal with different variants */ 569 return 0; /* only numbers can be equal with different variants */
570 else { /* two numbers with different variants */ 570 else { /* two numbers with different variants */
571 lua_Integer i1, i2; /* compare them as integers */ 571 /* One of them is an integer. If the other does not have an
572 return (tointegerns(t1, &i1) && tointegerns(t2, &i2) && i1 == i2); 572 integer value, they cannot be equal; otherwise, compare their
573 integer values. */
574 lua_Integer i1, i2;
575 return (luaV_tointegerns(t1, &i1, F2Ieq) &&
576 luaV_tointegerns(t2, &i2, F2Ieq) &&
577 i1 == i2);
573 } 578 }
574 } 579 }
575 /* values have same type and same variant */ 580 /* values have same type and same variant */