From f2646e054ce3d1bfa86471553e663b426a143ad8 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Fri, 10 Feb 2006 17:28:17 +0100 Subject: fix DSC parsing for non-DSC documents --- src/PostscriptDSC.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/PostscriptDSC.cxx b/src/PostscriptDSC.cxx index dfc9775..985722d 100644 --- a/src/PostscriptDSC.cxx +++ b/src/PostscriptDSC.cxx @@ -120,14 +120,18 @@ PostscriptDSC::parse(int fd) { } } } + + if (page_len && page_off) { + page_len[p1 - 1] = ftello(fp) - page_off[p1 - 1]; - page_len[p1 - 1] = ftello(fp) - page_off[p1 - 1]; - - for (int i=0; i