From 4269e5747c6ea6c159c57519c7fee4b533590de9 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 17 Jul 2007 18:07:36 +0200 Subject: fix DSC problem (reported by Jim Cline) --- src/PostscriptDSC.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/PostscriptDSC.cxx b/src/PostscriptDSC.cxx index a4beb04..b126a3d 100644 --- a/src/PostscriptDSC.cxx +++ b/src/PostscriptDSC.cxx @@ -90,7 +90,8 @@ PostscriptDSC::parse(int fd) { bb_w = w; bb_h = h; bb_read++; - } else if (strncmp(linebuf, "%%EndSetup", strlen("%%EndSetup")) == 0) { + } else if (setup_len == 0 && + strncmp(linebuf, "%%EndSetup", strlen("%%EndSetup")) == 0) { setup_len = ftell(fp); } else if (strncmp(linebuf, "%%Page: ", strlen("%%Page: ")) == 0) { char *p_str = &linebuf[strlen(linebuf)]; -- cgit v1.2.3