diff options
author | Mike Pall <mike> | 2013-05-18 14:11:59 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-05-18 14:11:59 +0200 |
commit | 1593e7750b29d11b71f20dbde85845b7b0689d1d (patch) | |
tree | b8e9538897f1006c957fc1725485a95635e403be | |
parent | 0f79d4741f29637de1eaaa603fdd0d161feb390d (diff) | |
download | luajit2-1593e7750b29d11b71f20dbde85845b7b0689d1d.tar.gz |
FFI: Improve error messages for arithmetic and comparison operators.
-rw-r--r-- | src/lj_carith.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_carith.c b/src/lj_carith.c index 18708d66..afe7e682 100644 --- a/src/lj_carith.c +++ b/src/lj_carith.c @@ -238,7 +238,7 @@ static int lj_carith_meta(lua_State *L, CTState *cts, CDArith *ca, MMS mm) return 1; } for (i = 0; i < 2; i++) { - if (ca->ct[i]) { + if (ca->ct[i] && tviscdata(L->base+i)) { if (ctype_isenum(ca->ct[i]->info)) isenum = i; repr[i] = strdata(lj_ctype_repr(L, ctype_typeid(cts, ca->ct[i]), NULL)); } else { |