summaryrefslogtreecommitdiff
path: root/src/lib/evas/common
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-28 09:08:44 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-28 15:28:00 +0900
commite095562ea1da6ddb9de40882d9345be9bcc6223f (patch)
treeba2a6c72c52a87ed492667a1a45858ead6fb6ea6 /src/lib/evas/common
parent902938f626adde50c7b14a800e87c92a79f72a78 (diff)
evas font loading - fix possible divide by 0 when font size is 0
fix coverity CID 1381446
Diffstat (limited to 'src/lib/evas/common')
-rw-r--r--src/lib/evas/common/evas_font_load.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/evas/common/evas_font_load.c b/src/lib/evas/common/evas_font_load.c
index 6bf1e34a08..f568fa718a 100644
--- a/src/lib/evas/common/evas_font_load.c
+++ b/src/lib/evas/common/evas_font_load.c
@@ -487,7 +487,12 @@ evas_common_font_int_load_complete(RGBA_Font_Int *fi)
487 { 487 {
488 if (FT_HAS_COLOR(fi->src->ft.face) && 488 if (FT_HAS_COLOR(fi->src->ft.face) &&
489 fi->bitmap_scalable & EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR) 489 fi->bitmap_scalable & EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR)
490 fi->scale_factor = (float)fi->size * 64.0 / (float)fi->real_size; 490 {
491 if (fi->real_size > 0)
492 fi->scale_factor = (float)fi->size * 64.0 / (float)fi->real_size;
493 else
494 fi->scale_factor = (float)64.0;
495 }
491 } 496 }
492 } 497 }
493 else 498 else