diff options
| author | Philipp Janda <siffiejoe@gmx.net> | 2015-02-20 12:22:24 +0100 |
|---|---|---|
| committer | Philipp Janda <siffiejoe@gmx.net> | 2015-02-20 12:22:24 +0100 |
| commit | 7465629f1779c702a4b2db8274cddc057adda659 (patch) | |
| tree | 028b53197f2573cc72892a50c4e7dea7d8bde830 | |
| parent | 0f3c994dc36a90d0b80bf0840e8951d9476e346e (diff) | |
| download | lua-compat-5.3-7465629f1779c702a4b2db8274cddc057adda659.tar.gz lua-compat-5.3-7465629f1779c702a4b2db8274cddc057adda659.tar.bz2 lua-compat-5.3-7465629f1779c702a4b2db8274cddc057adda659.zip | |
fix test for invalid LUA_OP*
| -rw-r--r-- | c-api/compat-5.3.c | 2 |
1 files changed, 1 insertions, 1 deletions
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[] = | |||
| 51 | "end\n"; | 51 | "end\n"; |
| 52 | 52 | ||
| 53 | COMPAT53_API void lua_arith (lua_State *L, int op) { | 53 | COMPAT53_API void lua_arith (lua_State *L, int op) { |
| 54 | if (op < LUA_OPADD && op > LUA_OPUNM) | 54 | if (op < LUA_OPADD || op > LUA_OPUNM) |
| 55 | luaL_error(L, "invalid 'op' argument for lua_arith"); | 55 | luaL_error(L, "invalid 'op' argument for lua_arith"); |
| 56 | luaL_checkstack(L, 5, "not enough stack slots"); | 56 | luaL_checkstack(L, 5, "not enough stack slots"); |
| 57 | if (op == LUA_OPUNM) | 57 | if (op == LUA_OPUNM) |
