summaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lcode.c b/lcode.c
index 9cba24f9..06425a1d 100644
--- a/lcode.c
+++ b/lcode.c
@@ -607,7 +607,7 @@ static int luaK_numberK (FuncState *fs, lua_Number r) {
return addk(fs, &o, &o); /* use number itself as key */
else { /* must build an alternative key */
const int nbm = l_floatatt(MANT_DIG);
- const lua_Number q = l_mathop(ldexp)(1.0, -nbm + 1);
+ const lua_Number q = l_mathop(ldexp)(l_mathop(1.0), -nbm + 1);
const lua_Number k = (ik == 0) ? q : r + r*q; /* new key */
TValue kv;
setfltvalue(&kv, k);