summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
index 5b90bcc8..d3066fc0 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -127,7 +127,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
int exp = Math.max(0, Math.min((int) (Math.log(bytes) / Math.log(unit)), 3));
- float bytesUnit = Math.round(bytes / Math.pow(unit, exp));
+ float bytesUnit = (float) (bytes / Math.pow(unit, exp));
if (speed)
switch (exp) {