mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 06:12:27 +00:00
Fix oops w/ array serialization ordering
This commit is contained in:
parent
727d9cbf56
commit
d37536bd4b
3 changed files with 5 additions and 5 deletions
2
third_party/lua/luaencodeluadata.c
vendored
2
third_party/lua/luaencodeluadata.c
vendored
|
@ -181,8 +181,8 @@ static int LuaEncodeLuaDataImpl(lua_State *L, char **buf, int level,
|
|||
lua_pop(L, 1); // table/-2, key/-1
|
||||
}
|
||||
lua_pop(L, 1); // table ref
|
||||
if (!isarray) SortStrList(&sl);
|
||||
RETURN_ON_ERROR(appendw(buf, '{'));
|
||||
SortStrList(&sl);
|
||||
RETURN_ON_ERROR(JoinStrList(&sl, buf, READ16LE(", ")));
|
||||
RETURN_ON_ERROR(appendw(buf, '}'));
|
||||
FreeStrList(&sl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue