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 <> wrote:
> You need room for the terminating null byte.

Sorry didn't mean  to press send.


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