lua-users home
lua-l archive

Re: writing to binary files

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


"Carlos" <carlos-smith@sympatico.ca> a écrit dans le message de news: 
ftvncl30ドルb1ドル@ger.gmane.org...
> But if compiled with -O2 or -O3, the test file crash lua in the
> pack function for all the test where i8 is used.
Well, i do not understand why, but if you modify the putinteger function:
static void putinteger (lua_State *L, luaL_Buffer *b, int arg, int endian, 
int size)
{
 //unsigned char buff[sizeof(long)]; <--- replace
 unsigned char buff[2*sizeof(long)]; <--- with
there is no more crash.
?

AltStyle によって変換されたページ (->オリジナル) /