diff options
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/psaux/psarrst.c')
-rw-r--r-- | Build/source/libs/freetype2/freetype-src/src/psaux/psarrst.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/psaux/psarrst.c b/Build/source/libs/freetype2/freetype-src/src/psaux/psarrst.c index 8751d275fb9..70313d283a4 100644 --- a/Build/source/libs/freetype2/freetype-src/src/psaux/psarrst.c +++ b/Build/source/libs/freetype2/freetype-src/src/psaux/psarrst.c @@ -65,7 +65,6 @@ arrstack->error = error; arrstack->sizeItem = sizeItem; arrstack->allocated = 0; - arrstack->chunk = 10; /* chunks of 10 items */ arrstack->count = 0; arrstack->totalSize = 0; arrstack->ptr = NULL; @@ -110,7 +109,7 @@ FT_ASSERT( newSize > 0 ); /* avoid realloc with zero size */ - if ( !FT_REALLOC( arrstack->ptr, arrstack->totalSize, newSize ) ) + if ( !FT_QREALLOC( arrstack->ptr, arrstack->totalSize, newSize ) ) { arrstack->allocated = numElements; arrstack->totalSize = newSize; @@ -216,9 +215,9 @@ if ( arrstack->count == arrstack->allocated ) { - /* grow the buffer by one chunk */ + /* increase the buffer size */ if ( !cf2_arrstack_setNumElements( - arrstack, arrstack->allocated + arrstack->chunk ) ) + arrstack, arrstack->allocated * 2 + 16 ) ) { /* on error, ignore the push */ return; |