From 4e6a0a432d960c32334955b7768d4e8d43ef679a Mon Sep 17 00:00:00 2001 From: kramm Date: Sat, 23 Jul 2005 15:38:54 +0000 Subject: [PATCH] fixed off-by-one bug in link handling --- pdf2swf/swfoutput.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 0d0246b..632a9ff 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -1332,7 +1332,8 @@ void swf_drawlink(gfxdevice_t*dev, gfxline_t*points, char*url) if(url[t]<'0' || url[t]>'9') nodigit = 1; if(!nodigit) { - int page = atoi(&url[4]); + int page = atoi(&url[4]) - 1; + if(page<0) page = 0; swfoutput_linktopage(dev, page, points); } } else { -- 1.7.10.4