From 19afd916870a0621b59e8728d439b0fe10288b99 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 8 Nov 2023 10:02:06 -0300 Subject: Solving merge issue with use of tables in dump/undump The use of tables in dump/undump to reuse strings did not exist in the version that changed the representation of arrays, so it was not corrected for the new API for tables. --- lundump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lundump.c') diff --git a/lundump.c b/lundump.c index 45708f96..5b4cd2ea 100644 --- a/lundump.c +++ b/lundump.c @@ -143,8 +143,9 @@ static TString *loadStringN (LoadState *S, Proto *p) { return NULL; else if (size == 1) { /* previously saved string? */ int idx = loadInt(S); /* get its index */ - const TValue *stv = luaH_getint(S->h, idx); - return tsvalue(stv); + TValue stv; + luaH_getint(S->h, idx, &stv); + return tsvalue(&stv); } else if (size -= 2, size <= LUAI_MAXSHORTLEN) { /* short string? */ char buff[LUAI_MAXSHORTLEN]; -- cgit v1.2.3-55-g6feb