From 222f03bbdafe16eff0b5072ddc8e2866b3408b95 Mon Sep 17 00:00:00 2001 From: Baileyeatspizza <68239467+Baileyeatspizza@users.noreply.github.com> Date: Mon, 29 Nov 2021 16:13:55 +0000 Subject: [PATCH] Update lmathlib.cpp (#241) --- VM/src/lmathlib.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/VM/src/lmathlib.cpp b/VM/src/lmathlib.cpp index 8e476a5..50bcf70 100644 --- a/VM/src/lmathlib.cpp +++ b/VM/src/lmathlib.cpp @@ -385,8 +385,7 @@ static int math_sign(lua_State* L) static int math_round(lua_State* L) { - double v = luaL_checknumber(L, 1); - lua_pushnumber(L, round(v)); + lua_pushnumber(L, round(luaL_checknumber(L, 1))); return 1; }