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 | luajit-1593e7750b29d11b71f20dbde85845b7b0689d1d.tar.gz luajit-1593e7750b29d11b71f20dbde85845b7b0689d1d.tar.bz2 luajit-1593e7750b29d11b71f20dbde85845b7b0689d1d.zip | |
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) | |||
| 238 | return 1; | 238 | return 1; |
| 239 | } | 239 | } |
| 240 | for (i = 0; i < 2; i++) { | 240 | for (i = 0; i < 2; i++) { |
| 241 | if (ca->ct[i]) { | 241 | if (ca->ct[i] && tviscdata(L->base+i)) { |
| 242 | if (ctype_isenum(ca->ct[i]->info)) isenum = i; | 242 | if (ctype_isenum(ca->ct[i]->info)) isenum = i; |
| 243 | repr[i] = strdata(lj_ctype_repr(L, ctype_typeid(cts, ca->ct[i]), NULL)); | 243 | repr[i] = strdata(lj_ctype_repr(L, ctype_typeid(cts, ca->ct[i]), NULL)); |
| 244 | } else { | 244 | } else { |
