[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: writing to binary files
- From: "Carlos" <carlos-smith@...>
- Date: Mon, 14 Apr 2008 10:25:41 -0400
"Carlos" <carlos-smith@sympatico.ca> a écrit dans le message de news:
ftvncl$30b$1@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.
?