|
Mike Pall wrote:
Hi, Andreas Stenius wrote:- e1->u.s.info = e2->u.s.info; e1->u.s.aux = e2->u.s.aux; + e1->u = e2->u;Ok, this is a serious bug in Lua 5.1. It's only visible if sizeof(int)*2 < sizeof(lua_Number). I.e. it probably only affects 16 bit CPUs with lua_Number defined as a double.
ITYM 16 bit CPUs with out of spec C compilers ;) int *should* be 32 bits, regardless of the architecture.
Not that I'm naive enough to think that there are more than one or two in spec C compilers out there, mind.
But the fix bears the question: is union assignment part of C89?
This is the bigger concern. If not, I'm suspecting there's also not a nice standard way you can massage this away with macro magic, either :(
-- Lisa