summaryrefslogtreecommitdiffstats
path: root/src/psaux/t1decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/psaux/t1decode.c')
-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 f790643..550ba64 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;