summaryrefslogtreecommitdiff
path: root/src/cairo-ps-surface.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2024-06-26 20:05:14 +0930
committerAdrian Johnson <ajohnson@redneon.com>2024-06-27 07:07:22 +0930
commit6967beb24ec605a4028ed4d0d065eefc5eb70ceb (patch)
tree7ac10d081ae5f7e3367e1073b841a36b3b2570b4 /src/cairo-ps-surface.c
parent16dd5cd4c2fb74ad6ef0d0a221b97d0c222d259f (diff)
ps: fix max form size
Fixes: #845
Diffstat (limited to 'src/cairo-ps-surface.c')
-rw-r--r--src/cairo-ps-surface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 1d2bba20e..5421c39c9 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -3507,13 +3507,13 @@ _cairo_ps_surface_use_form (cairo_ps_surface_t *surface,
if (surface->ps_level == CAIRO_PS_LEVEL_3)
max_size = MAX_L3_FORM_DATA;
else
- max_size = MAX_L3_FORM_DATA;
+ max_size = MAX_L2_FORM_DATA;
/* Don't add any more Forms if we exceed the form memory limit */
if (surface->total_form_size + params->approx_size > max_size)
return CAIRO_INT_STATUS_UNSUPPORTED;
- surface->total_form_size += params->approx_size > max_size;
+ surface->total_form_size += params->approx_size;
unique_id = _cairo_malloc (source_key.unique_id_length);
if (unique_id == NULL)
return _cairo_error (CAIRO_STATUS_NO_MEMORY);