summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/psaux/psarrst.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/psaux/psarrst.c')
-rw-r--r--src/3rdparty/freetype/src/psaux/psarrst.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/3rdparty/freetype/src/psaux/psarrst.c b/src/3rdparty/freetype/src/psaux/psarrst.c
index 8751d275fb..70313d283a 100644
--- a/src/3rdparty/freetype/src/psaux/psarrst.c
+++ b/src/3rdparty/freetype/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;