aboutsummaryrefslogtreecommitdiff
path: root/lundump.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lundump.c5
1 files changed, 3 insertions, 2 deletions
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) {
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];