edje/calc: clamp part calc size to 0
authorMike Blumenkrantz <zmike@samsung.com>
Mon, 29 Jul 2019 14:58:07 +0000 (10:58 -0400)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 5 Aug 2019 01:48:35 +0000 (10:48 +0900)
this could previously have been negative

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9431

src/lib/edje/edje_calc.c

index d52af71..fce21fd 100644 (file)
@@ -3070,7 +3070,9 @@ _edje_part_recalc_single(Edje *ed,
    params->req.x = TO_INT(params->eval.x);
    params->req.y = TO_INT(params->eval.y);
    params->req.w = TO_INT(params->eval.w);
+   if (params->req.w < 0) params->req.w = 0;
    params->req.h = TO_INT(params->eval.h);
+   if (params->req.h < 0) params->req.h = 0;
 
    /***********************************************************************************
     * TIZEN_ONLY_FEATURE: API for handling common properties of Edje                  *