lua-users home
lua-l archive

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


"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.

?