[poppler] Poppler Fix #bug Number 25578
Albert Astals Cid
aacid at kde.org
Fri Dec 11 00:48:58 PST 2009
A Divendres 11 Desembre 2009 07:07:49, amit aggarwal va escriure:
> One more changes in poppler../goo/FixedPoint.cc
>
> -- int FixedPoint::div(int x, int y) {
> -- #if 1 //~tmp
> -- return ((FixPtInt64)x << fixptShift) / y;
>
> ++ int FixedPoint::div(int x, int y) {
> ++ #if 1 //~tmp
> ++ if(y>0)
> ++ return ((FixPtInt64)x << fixptShift) / y;
> ++ else
> ++ return 0;
Hi Amit, thanks for the patch, but please do not post patches both here and on
the bug because otherwise we lose track of which patches are the
newest/correct ones. I also have posted some more comments about the issue on
the bugzilla issue.
Albert
>
>
> Thanks
> Amit
>
> On Fri, Dec 11, 2009 at 12:27 PM, amit aggarwal <amitcs06 at gmail.com> wrote:
> > poppler/goo/FixedPoint.cc
> >
> > Old Code
> > ---int FixedPoint::mul(int x, int y) {
> > #if 1 //~tmp
> > return ((FixPtInt64)x * y) >> fixptShift;
> >
> > New Changes
> > +++
> > FixPtInt64 FixedPoint::mul(FixPtInt64 x, FixPtInt64 y) {
> > #if 1 //~tmp
> > FixPtInt64 val;
> > val =((FixPtInt64)(x * y))>>fixptShift;
> >
> > return val;
> >
> >
> > poppler/goo/FixedPoint.h
> >
> > OldCode
> > --static FixedPoint make(int valA) { FixedPoint x; x.val = valA; return
> > x; }
> >
> > New changes
> > ++ static FixedPoint make(FixPtInt64 valA) { FixedPoint x; x.val = valA;
> > return x; }
> >
> > -- static int mul(int x, int y);
> > ++ static FixPtInt64 mul(FixPtInt64 x, FixPtInt64 y);
> >
> >
> > -- static int div(int x, int y);
> > ++ static FixPtInt64 div(FixPtInt64 x, FixPtInt64 y);
> >
> > -- int val; // 16.16 fixed point
> > ++ FixPtInt64 val; // 16.16 fixed point
> >
> > --
> > Thanks
> > Amit Aggarwal
>
More information about the poppler
mailing list