From 3b57e37e4821ddce4756428956b7e9f4969efa4c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 10 Nov 2023 12:35:48 -0300 Subject: Fixed buffers save long strings as external. --- ldump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ldump.c') 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) { 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 */ -- cgit v1.2.3-55-g6feb