diff options
Diffstat (limited to 'src/lj_carith.c')
-rw-r--r-- | src/lj_carith.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lj_carith.c b/src/lj_carith.c index 56708bf6..583a3876 100644 --- a/src/lj_carith.c +++ b/src/lj_carith.c | |||
@@ -205,6 +205,10 @@ static int lj_carith_meta(lua_State *L, CTState *cts, CDArith *ca, MMS mm) | |||
205 | if (!tv) { | 205 | if (!tv) { |
206 | const char *repr[2]; | 206 | const char *repr[2]; |
207 | int i; | 207 | int i; |
208 | if (mm == MM_eq) { /* Equality checks never raise an error. */ | ||
209 | setboolV(L->top-1, 0); | ||
210 | return 1; | ||
211 | } | ||
208 | for (i = 0; i < 2; i++) { | 212 | for (i = 0; i < 2; i++) { |
209 | if (ca->ct[i]) | 213 | if (ca->ct[i]) |
210 | repr[i] = strdata(lj_ctype_repr(L, ctype_typeid(cts, ca->ct[i]), NULL)); | 214 | repr[i] = strdata(lj_ctype_repr(L, ctype_typeid(cts, ca->ct[i]), NULL)); |