aboutsummaryrefslogtreecommitdiff
path: root/ldump.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-11-10 12:35:48 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-11-10 12:35:48 -0300
commit3b57e37e4821ddce4756428956b7e9f4969efa4c (patch)
treea0bd071341349d964d98f55e7c2be8860792ff1f /ldump.c
parent024f9064f1b43758eb36aba52547edc0312bf4ba (diff)
downloadlua-3b57e37e4821ddce4756428956b7e9f4969efa4c.tar.gz
lua-3b57e37e4821ddce4756428956b7e9f4969efa4c.tar.bz2
lua-3b57e37e4821ddce4756428956b7e9f4969efa4c.zip
Fixed buffers save long strings as external.
Diffstat (limited to 'ldump.c')
-rw-r--r--ldump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldump.c b/ldump.c
index c6f2c4e1..090d6aab 100644
--- a/ldump.c
+++ b/ldump.c
@@ -126,7 +126,7 @@ static void dumpString (DumpState *D, TString *ts) {
126 size_t size; 126 size_t size;
127 const char *s = getlstr(ts, size); 127 const char *s = getlstr(ts, size);
128 dumpSize(D, size + 2); 128 dumpSize(D, size + 2);
129 dumpVector(D, s, size); 129 dumpVector(D, s, size + 1); /* include ending '\0' */
130 D->nstr++; /* one more saved string */ 130 D->nstr++; /* one more saved string */
131 setsvalue(D->L, &key, ts); /* the string is the key */ 131 setsvalue(D->L, &key, ts); /* the string is the key */
132 setivalue(&value, D->nstr); /* its index is the value */ 132 setivalue(&value, D->nstr); /* its index is the value */