aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/edje
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-23 19:48:16 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-23 19:48:16 +0900
commit83a249baa1743399f97cfe03e0d4f83aec787199 (patch)
tree418c6492d6344c773cf3689ee28ff27c51f4af13 /src/bin/edje
parentedje_cc out ... fix theoretical div by zero... (diff)
downloadefl-83a249baa1743399f97cfe03e0d4f83aec787199.tar.gz
edje_cc out - fix theoretical div by 0
fixes CID 1371125
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/edje_cc_out.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index be78606141..1f4315cef7 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -2527,9 +2527,12 @@ data_thread_license(void *data, Ecore_Thread *thread EINA_UNUSED)
}
else
{
+ double fsize = eina_file_size_get(f);
+
+ if (fsize < 0.0) fsize = 0.0;
INF("Wrote %9i bytes (%4iKb) for \"%s\" license entry compress: [real: %2.1f%%]",
bytes, (bytes + 512) / 1024, license,
- 100 - (100 * (double)bytes) / ((double)(eina_file_size_get(f))));
+ 100.0 - ((100.0 * (double)bytes) / fsize));
}
eina_file_map_free(f, m);