lua-users home
lua-l archive

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


On 8 November 2011 21:28, Daurnimator <quae@daurnimator.com> wrote:
>
> You need room for the terminating null byte.
>

Sorry didn't mean  to press send.

See http://luajit.org/ext_ffi_semantics.html#init

Byte arrays may also be initialized with a Lua string. This copies the
whole string plus a terminating zero-byte. The copy stops early only
if the array has a known, fixed size.


I guess a VLA (A variable-length array) is not of a known, fixed size.
(though I guess it should be.....)

D