From cc5075e845368538e239a64a34a68c702fbf529d Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 8 Apr 2014 16:53:41 +0200 Subject: [PATCH] FFI: Fix cdata equality comparison against other Lua types. --- src/lj_carith.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_carith.c b/src/lj_carith.c index 36d7abb1..9a451b24 100644 --- a/src/lj_carith.c +++ b/src/lj_carith.c @@ -79,7 +79,7 @@ static int carith_checkarg(lua_State *L, CTState *cts, CDArith *ca) } } else { ca->ct[i] = NULL; - ca->p[i] = NULL; + ca->p[i] = (void *)(intptr_t)1; /* To make it unequal. */ ok = 0; } }