diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-11-10 12:35:48 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-11-10 12:35:48 -0300 |
commit | 3b57e37e4821ddce4756428956b7e9f4969efa4c (patch) | |
tree | a0bd071341349d964d98f55e7c2be8860792ff1f /ldump.c | |
parent | 024f9064f1b43758eb36aba52547edc0312bf4ba (diff) | |
download | lua-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 */ |