summaryrefslogtreecommitdiff
path: root/fitz/dev_text.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/dev_text.c')
-rw-r--r--fitz/dev_text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fitz/dev_text.c b/fitz/dev_text.c
index e23479e9..2cd4ab11 100644
--- a/fitz/dev_text.c
+++ b/fitz/dev_text.c
@@ -69,7 +69,7 @@ fz_addtextcharimp(fz_textspan *span, int c, fz_bbox bbox)
{
if (span->len + 1 >= span->cap)
{
- span->cap = span->cap ? (span->cap * 3) / 2 : 80;
+ span->cap = span->cap > 1 ? (span->cap * 3) / 2 : 80;
span->text = fz_realloc(span->text, sizeof(fz_textchar) * span->cap);
}
span->text[span->len].c = c;