Update lmathlib.cpp (#241)

This commit is contained in:
Baileyeatspizza 2021-11-29 16:13:55 +00:00 committed by GitHub
parent dd02420f70
commit 222f03bbda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}