lua-users home
lua-l archive

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


> I am using an OS that generates strings up to 60 bytes in length
> for the sprintf %%p (i.e. the pointer presentation)
> 
> Lua5 sprintf points into a buffer of 64 bytes, not big enough.

What about changing those sizes to the following expression?

  16 + sizeof(void *)*4

16 bytes would be for the fixed part; for `%p', we would have 4 bytes of
representation for each real byte.

In "regular" Lua, that would be 48. In your machine, that would be 80.

-- Roberto