summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-07-17 18:07:36 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-07-17 18:07:36 +0200
commit4269e5747c6ea6c159c57519c7fee4b533590de9 (patch)
tree66d04ddeebe765a656f4f64e4c4c46bb99f1112b
parent68c0b5c54dd960a0563e0280ebed6033384efca0 (diff)
fix DSC problem (reported by Jim Cline)
-rw-r--r--src/PostscriptDSC.cxx3
1 files changed, 2 insertions, 1 deletions
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)];