bug in buffer growth algorithm.

This commit is contained in:
Kelvin Sherlock 2019-07-13 14:22:35 -04:00
parent 41674ac33d
commit eb69b619c9
1 changed files with 1 additions and 2 deletions

3
nda.c
View File

@ -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;