diff options
Diffstat (limited to '')
| -rw-r--r-- | ltm.c | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltm.c,v 2.45 2017/10/04 15:49:05 roberto Exp $ | 2 | ** $Id: ltm.c,v 2.47 2017/11/07 13:25:26 roberto Exp roberto $ |
| 3 | ** Tag methods | 3 | ** Tag methods |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -153,8 +153,7 @@ void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, | |||
| 153 | /* call never returns, but to avoid warnings: *//* FALLTHROUGH */ | 153 | /* call never returns, but to avoid warnings: *//* FALLTHROUGH */ |
| 154 | case TM_BAND: case TM_BOR: case TM_BXOR: | 154 | case TM_BAND: case TM_BOR: case TM_BXOR: |
| 155 | case TM_SHL: case TM_SHR: case TM_BNOT: { | 155 | case TM_SHL: case TM_SHR: case TM_BNOT: { |
| 156 | lua_Number dummy; | 156 | if (ttisnumber(p1) && ttisnumber(p2)) |
| 157 | if (tonumber(p1, &dummy) && tonumber(p2, &dummy)) | ||
| 158 | luaG_tointerror(L, p1, p2); | 157 | luaG_tointerror(L, p1, p2); |
| 159 | else | 158 | else |
| 160 | luaG_opinterror(L, p1, p2, "perform bitwise operation on"); | 159 | luaG_opinterror(L, p1, p2, "perform bitwise operation on"); |
