[poppler] Poppler Fix #bug Number 25578
amit aggarwal
amitcs06 at gmail.com
Thu Dec 10 23:07:49 PST 2009
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;
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
>
>
--
Thanks
Amit Aggarwal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/poppler/attachments/20091211/c83b2749/attachment.htm
More information about the poppler
mailing list