mirror of
https://github.com/ksherlock/dict.git
synced 2024-05-28 11:41:28 +00:00
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;
|
size = TextHandleUsed + length;
|
||||||
if (size > TextHandleSize) {
|
if (size > TextHandleSize) {
|
||||||
size += 4095;
|
size += 4095;
|
||||||
size &= 4096;
|
size &= ~4096;
|
||||||
|
|
||||||
if (h) {
|
if (h) {
|
||||||
HUnlock(h);
|
HUnlock(h);
|
||||||
|
@ -120,7 +120,6 @@ void AppendText(word length, char *cp) {
|
||||||
if (_toolErr) return;
|
if (_toolErr) return;
|
||||||
TextHandleSize = size;
|
TextHandleSize = size;
|
||||||
}
|
}
|
||||||
HLock(h);
|
|
||||||
}
|
}
|
||||||
BlockMove(cp, *h + TextHandleUsed, length);
|
BlockMove(cp, *h + TextHandleUsed, length);
|
||||||
TextHandleUsed += length;
|
TextHandleUsed += length;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user