summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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)];