[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT segfault
- From: Daurnimator <quae@...>
- Date: Tue, 8 Nov 2011 21:30:39 +1100
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