eio: let's not divide by 0.

fix CID 1193208.
This commit is contained in:
Cedric BAIL 2014-03-20 16:47:25 +09:00
parent cf5192025f
commit 41a9e2149e
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op, long long current
progress->op = op->op;
progress->current = current;
progress->max = max;
progress->percent = (float) current * 100.0 / (float) max;
progress->percent = max ? (float) current * 100.0 / (float) max : 100;
progress->source = eina_stringshare_ref(op->source);
progress->dest = eina_stringshare_ref(op->dest);