I considered also there. but if so, we may need to checkuvx, uvh everywhere 
before passing the values.
 
And it looks it needs to update map with zero sizes if the values are changed 
to zero. 
 
So i put the code inside map update.
 
If you argue it should be outside, then i think it's better fix it first then 
update CNN. 
 
------------------------------------

-Regards, Hermet- 
-----Original Message-----
From: "Cedric BAIL"<[email protected]> 
To: "e-devel"<[email protected]>; 
Cc: 
Sent: 2013-01-15 (화) 14:44:18
Subject: Re: [E-devel] E SVN: hermet trunk/efl/src/lib/evas/canvas

On Tue, Jan 15, 2013 at 2:11 PM, Enlightenment SVN
<no-reply>@enlightenment.org> wrote:
> Log:
> evas/map - avoid zero divide.

Not sure if that's the proper place to fix this issue. uvx and uvw
should not be zero. I think it's a bug in the one calling it that show
up here. Evas_Render does have code to protect against such call, but
Evas_Object_Image seems not. I think it would be better to fix that
there.

Anyway, ChangeLog, NEWS and backport :-)

> Author:       hermet
> Date:         2013-01-14 21:11:11 -0800 (Mon, 14 Jan 2013)
> New Revision: 82792
> Trac:         http://trac.enlightenment.org/e/changeset/82792
>
> Modified:
>   trunk/efl/src/lib/evas/canvas/evas_map.c
>
> Modified: trunk/efl/src/lib/evas/canvas/evas_map.c
> ===================================================================
> --- trunk/efl/src/lib/evas/canvas/evas_map.c    2013-01-15 04:20:37 UTC 
(rev 82791)
> +++ trunk/efl/src/lib/evas/canvas/evas_map.c    2013-01-15 05:11:11 UTC 
(rev 82792)
> @@ -1227,7 +1227,7 @@
>     p = obj->cur.map->points;
>     p_end = p + obj->cur.map->count;
>     pt = pts;
> -
> +
>     pts[0].px = obj->cur.map->persp.px << FP;
>     pts[0].py = obj->cur.map->persp.py << FP;
>     pts[0].foc = obj->cur.map->persp.foc << FP;
> @@ -1241,8 +1241,10 @@
>          pt->fx = p->px;
>          pt->fy = p->py;
>          pt->fz = p->z;
> -        pt->u = ((lround(p->u) * imagew) / uvw) * FP1;
> -        pt->v = ((lround(p->v) * imageh) / uvh) * FP1;
> +        if (uvw == 0) pt->u = 0;
> +        else pt->u = ((lround(p->u) * imagew) / uvw) * FP1;
> +        if (uvh == 0) pt->v = 0;
> +        else pt->v = ((lround(p->v) * imageh) / uvh) * FP1;
>          if      (pt->u < 0) pt->u = 0;
>          else if (pt->u > (imagew * FP1)) pt->u = (imagew * FP1);
>          if      (pt->v < 0) pt->v = 0;
>
>
> 
------------------------------------------------------------------------------
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>



--
Cedric BAIL

------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

 
------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to