El Diumenge, 5 de febrer de 2012, a les 06:59:29, Leonard Rosenthol va escriure: > You need to be careful here, since there are places in the PDF spec where > you MUST have an integer and returning a real would be bad.
That's ok, if it MUST have an integer we MUST use Object::getInt that will fail for reals. Albert > Leonard > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf > Of Adrian Johnson Sent: Sunday, February 05, 2012 9:45 AM > To: [email protected] > Subject: [poppler] Branch 'poppler-0.18' - poppler/Lexer.cc > > poppler/Lexer.cc | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > New commits: > commit fb629ac684a7f05d95d10285807c2cf1602d28ca > Author: Adrian Johnson <[email protected]> > Date: Sat Feb 4 17:13:30 2012 +1030 > > Lexer: convert integer to real when overflow occurs > > Bug 45605 > (cherry picked from commit 38ec58ed1cb54722aece875287b847643aa2c4b8) > > diff --git a/poppler/Lexer.cc b/poppler/Lexer.cc index 6250d40..98a9403 > 100644 --- a/poppler/Lexer.cc > +++ b/poppler/Lexer.cc > @@ -228,11 +228,13 @@ Object *Lexer::getObj(Object *obj, int objNum) { > break; > } > } > - if (neg) > + if (neg) { > xi = -xi; > + xf = -xf; > + } > if (unlikely(overflownInteger)) { > if (overflownUnsignedInteger) { > - obj->initError(); > + obj->initReal(xf); > } else { > obj->initUint(xui); > } > _______________________________________________ > poppler mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/poppler > _______________________________________________ > poppler mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/poppler _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
