lua-users home
lua-l archive

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


> On Aug 23, 2015, at 8:05 AM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> 
>> Yes I followed the code through as well, but I’m not happy with
>> basing usage on what the code happens to do when the spec is silent
>> about it.
> 
> Maybe it is just me, but it seems that it goes without saying (both for
> memcpy and for luaL_pushlstring and anything similar) that if you use
> zero bytes in address 'a', 'a' should be irrelevant.
> 
> -- Roberto
> 

Yes I agree, but having been bitten a few times in the past (a “memcpy” that crashed with NULL pointers even if size was zero) I was seeking confirmation. Thanks.

—Tim