From eb69b619c9ac7de65087892cbfe193d3b58be919 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sat, 13 Jul 2019 14:22:35 -0400 Subject: [PATCH] bug in buffer growth algorithm. --- nda.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nda.c b/nda.c index b3deb5d..b24ddaa 100644 --- a/nda.c +++ b/nda.c @@ -107,7 +107,7 @@ void AppendText(word length, char *cp) { size = TextHandleUsed + length; if (size > TextHandleSize) { size += 4095; - size &= 4096; + size &= ~4096; if (h) { HUnlock(h); @@ -120,7 +120,6 @@ void AppendText(word length, char *cp) { if (_toolErr) return; TextHandleSize = size; } - HLock(h); } BlockMove(cp, *h + TextHandleUsed, length); TextHandleUsed += length;