From 525501d1e45ff2e23649a95d208b1433abf1eb8b Mon Sep 17 00:00:00 2001 From: Baileyeatspizza Date: Wed, 24 Nov 2021 19:56:37 +0000 Subject: [PATCH] Update lmathlib.cpp --- 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 8e476a52..50bcf70c 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; }