mirror of https://github.com/ksherlock/dict.git
bug in buffer growth algorithm.
This commit is contained in:
parent
41674ac33d
commit
eb69b619c9
3
nda.c
3
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;
|
||||
|
|
Loading…
Reference in New Issue