diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-11-08 10:02:06 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-11-08 10:02:06 -0300 |
commit | 19afd916870a0621b59e8728d439b0fe10288b99 (patch) | |
tree | 297896bffc970723f98b2292868adfd97c61bd25 /lundump.c | |
parent | 37c215b43f27a1c41e8a920987e1c3bd7b34330d (diff) | |
download | lua-19afd916870a0621b59e8728d439b0fe10288b99.tar.gz lua-19afd916870a0621b59e8728d439b0fe10288b99.tar.bz2 lua-19afd916870a0621b59e8728d439b0fe10288b99.zip |
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.
Diffstat (limited to 'lundump.c')
-rw-r--r-- | lundump.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -143,8 +143,9 @@ static TString *loadStringN (LoadState *S, Proto *p) { | |||
143 | return NULL; | 143 | return NULL; |
144 | else if (size == 1) { /* previously saved string? */ | 144 | else if (size == 1) { /* previously saved string? */ |
145 | int idx = loadInt(S); /* get its index */ | 145 | int idx = loadInt(S); /* get its index */ |
146 | const TValue *stv = luaH_getint(S->h, idx); | 146 | TValue stv; |
147 | return tsvalue(stv); | 147 | luaH_getint(S->h, idx, &stv); |
148 | return tsvalue(&stv); | ||
148 | } | 149 | } |
149 | else if (size -= 2, size <= LUAI_MAXSHORTLEN) { /* short string? */ | 150 | else if (size -= 2, size <= LUAI_MAXSHORTLEN) { /* short string? */ |
150 | char buff[LUAI_MAXSHORTLEN]; | 151 | char buff[LUAI_MAXSHORTLEN]; |