diff options
Diffstat (limited to 'libs/liblua/src/lmathlib.c')
-rw-r--r-- | libs/liblua/src/lmathlib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/liblua/src/lmathlib.c b/libs/liblua/src/lmathlib.c index 86def470c4..5f5983a438 100644 --- a/libs/liblua/src/lmathlib.c +++ b/libs/liblua/src/lmathlib.c @@ -73,7 +73,7 @@ static int math_atan (lua_State *L) { static int math_toint (lua_State *L) { int valid; lua_Integer n = lua_tointegerx(L, 1, &valid); - if (valid) + if (l_likely(valid)) lua_pushinteger(L, n); else { luaL_checkany(L, 1); @@ -175,7 +175,8 @@ static int math_log (lua_State *L) { lua_Number base = luaL_checknumber(L, 2); #if !defined(LUA_USE_C89) if (base == l_mathop(2.0)) - res = l_mathop(log2)(x); else + res = l_mathop(log2)(x); + else #endif if (base == l_mathop(10.0)) res = l_mathop(log10)(x); |