FFI: Record conversions from bool ctype.

This commit is contained in:
Mike Pall
2011-01-17 01:21:57 +01:00
parent 66ba1e68aa
commit 83d8c86bbb
2 changed files with 8 additions and 3 deletions

View File

@@ -371,7 +371,9 @@ int lj_cconv_tv_ct(CTState *cts, CType *s, CTypeID sid,
/* Numbers are NOT canonicalized here! Beware of uninitialized data. */
lua_assert(tvisnum(o));
} else {
setboolV(o, (*sp & 1));
uint32_t b = ((*sp) & 1);
setboolV(o, b);
setboolV(&cts->g->tmptv2, b); /* Remember for trace recorder. */
}
return 0;
} else if (ctype_isrefarray(sinfo) || ctype_isstruct(sinfo)) {