mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
Fixed buffers save long strings as external.
This commit is contained in:
parent
024f9064f1
commit
3b57e37e48
4 changed files with 29 additions and 16 deletions
2
ldump.c
2
ldump.c
|
|
@ -126,7 +126,7 @@ static void dumpString (DumpState *D, TString *ts) {
|
|||
size_t size;
|
||||
const char *s = getlstr(ts, size);
|
||||
dumpSize(D, size + 2);
|
||||
dumpVector(D, s, size);
|
||||
dumpVector(D, s, size + 1); /* include ending '\0' */
|
||||
D->nstr++; /* one more saved string */
|
||||
setsvalue(D->L, &key, ts); /* the string is the key */
|
||||
setivalue(&value, D->nstr); /* its index is the value */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue