summaryrefslogtreecommitdiff
path: root/src/psaux
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2008-05-16 04:50:00 +0000
committerWerner Lemberg <wl@gnu.org>2008-05-16 04:50:00 +0000
commitbcc750e511a5f7c6f4284fed6cfbaf458cff8f37 (patch)
treecc3865f4e8113272877cdf7c3f8bcde349e6d153 /src/psaux
parentbcfcc71d299c01137cdc4c6522c3645e197cab36 (diff)
* src/psaux/t1decode.c (t1_decoder_parse_charstrings)
<op_closepath>: `closepath' without a path is a no-op, not an error (cf. the PS reference manual). Reported by Martin McBride.
Diffstat (limited to 'src/psaux')
-rw-r--r--src/psaux/t1decode.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index f790643f..550ba641 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
/* */
/* PostScript Type 1 decoding routines (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -1062,10 +1062,11 @@
case op_closepath:
FT_TRACE4(( " closepath" ));
- close_contour( builder );
- if ( !( builder->parse_state == T1_Parse_Have_Path ||
- builder->parse_state == T1_Parse_Have_Moveto ) )
- goto Syntax_Error;
+ /* if there is no path, `closepath' is a no-op */
+ if ( builder->parse_state == T1_Parse_Have_Path ||
+ builder->parse_state == T1_Parse_Have_Moveto )
+ close_contour( builder );
+
builder->parse_state = T1_Parse_Have_Width;
break;