From 7465629f1779c702a4b2db8274cddc057adda659 Mon Sep 17 00:00:00 2001 From: Philipp Janda Date: Fri, 20 Feb 2015 12:22:24 +0100 Subject: fix test for invalid LUA_OP* --- c-api/compat-5.3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-api/compat-5.3.c b/c-api/compat-5.3.c index b8110a8..2fdd36d 100644 --- a/c-api/compat-5.3.c +++ b/c-api/compat-5.3.c @@ -51,7 +51,7 @@ static const char compat53_arith_code[] = "end\n"; COMPAT53_API void lua_arith (lua_State *L, int op) { - if (op < LUA_OPADD && op > LUA_OPUNM) + if (op < LUA_OPADD || op > LUA_OPUNM) luaL_error(L, "invalid 'op' argument for lua_arith"); luaL_checkstack(L, 5, "not enough stack slots"); if (op == LUA_OPUNM) -- cgit v1.2.3-55-g6feb