[chronojump] DivideSafeFraction on GetLoss



commit fbc98b8b14584021c84f6ed330f0bf19f2bc1d32
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu May 25 17:10:15 2017 +0200

    DivideSafeFraction on GetLoss

 src/json.cs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/json.cs b/src/json.cs
index 8f7e488..383fe2f 100644
--- a/src/json.cs
+++ b/src/json.cs
@@ -562,6 +562,6 @@ public class UploadEncoderDataObject
                        if(compareTo > highest)
                                highest = compareTo;
                }
-               return Convert.ToInt32(100.0 * (highest - lowest) / highest);
+               return Convert.ToInt32(Util.DivideSafeFraction(100.0 * (highest - lowest), highest));
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]