aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/edje
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-07-24 09:50:05 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-07-24 09:50:05 +0900
commit4b4564c85776edafde9ae6407a3abc7a67910cf6 (patch)
tree0d99517744f187baabab4dacb34a28e7691b5b88 /src/bin/edje
parentelm_code: Fix crash with long lines (diff)
downloadefl-4b4564c85776edafde9ae6407a3abc7a67910cf6.tar.gz
edje_cc out: fix div by 0 correctly
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/edje_cc_out.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 1f4315cef7..99f46bf564 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -2529,7 +2529,7 @@ data_thread_license(void *data, Ecore_Thread *thread EINA_UNUSED)
{
double fsize = eina_file_size_get(f);
- if (fsize < 0.0) fsize = 0.0;
+ if (fsize <= 0.0) fsize = 1.0;
INF("Wrote %9i bytes (%4iKb) for \"%s\" license entry compress: [real: %2.1f%%]",
bytes, (bytes + 512) / 1024, license,
100.0 - ((100.0 * (double)bytes) / fsize));
@@ -2617,7 +2617,7 @@ data_thread_authors(void *data, Ecore_Thread *thread EINA_UNUSED)
{
double fsize = eina_file_size_get(f);
- if (fsize < 0.0) fsize = 0.0;
+ if (fsize <= 0.0) fsize = 1.0;
INF("Wrote %9i bytes (%4iKb) for \"%s\" authors entry compress: [real: %2.1f%%]",
bytes, (bytes + 512) / 1024, license,
100.0 - ((100.0 * (double)bytes) / fsize));