Log In  

New API pack() returns a table with an "n" field of always 0?

?pack(1,2).n -- 0 (expected: 2)
?pack(1,2,nil,3,nil).n -- 0 (expected: 5)

table.pack works as expected in lua.

P#76239 2020-05-09 15:53


Thanks @thisismypassword -- this is fixed for 0.2.0j

n is being set to 0x0.0002 instead of 2

P#76256 2020-05-09 18:39


Just to be sure: Does anything else in lua rely on pack()? It might be awkward if something expects .n to be in the low bits like it was before the fix. You don't want to end with something internal unpacking 64k, 128k, etc. entries.

P#76393 2020-05-11 20:08 ( Edited 2020-05-11 20:08)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-01-30 18:22:50 | 0.014s | Q:12