poppler/PageLabelInfo.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 7341d579cdd58ef28f67af76dc8f9a2c4592bef2 Author: Albert Astals Cid <aa...@kde.org> Date: Sun Oct 24 23:13:27 2021 +0200 PageLabelInfo::labelToIndex: work on some special no style intervals If the interval is length 1 we can assume the index is the base of the interval Fixes bug #1161 diff --git a/poppler/PageLabelInfo.cc b/poppler/PageLabelInfo.cc index be4f8fbe..31cd3a6b 100644 --- a/poppler/PageLabelInfo.cc +++ b/poppler/PageLabelInfo.cc @@ -3,7 +3,7 @@ // This file is under the GPLv2 or later license // // Copyright (C) 2005-2006 Kristian Høgsberg <k...@redhat.com> -// Copyright (C) 2005, 2009, 2013, 2017, 2018, 2020 Albert Astals Cid <aa...@kde.org> +// Copyright (C) 2005, 2009, 2013, 2017, 2018, 2020, 2021 Albert Astals Cid <aa...@kde.org> // Copyright (C) 2011 Simon Kellner <kell...@kit.edu> // Copyright (C) 2012 Fabio D'Urso <fabiodu...@hotmail.it> // Copyright (C) 2018 Adam Reichold <adam.reich...@t-online.de> @@ -151,6 +151,12 @@ bool PageLabelInfo::labelToIndex(GooString *label, int *index) const } break; case Interval::None: + if (interval.length == 1) { + *index = interval.base; + return true; + } else { + error(errSyntaxError, -1, "asking to convert label to page index in an unknown scenario, report a bug"); + } break; } }