summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/core
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-01-25 14:57:40 +0100
committerArne Schwabe <arne@rfc2549.org>2014-01-25 14:57:40 +0100
commit0cf62450e017a031afc637841a34105c25279067 (patch)
tree03817181a371a492b8b84ec73af24f80deb4f3b0 /src/de/blinkt/openvpn/core
parent491ea0e8bd9a9e200d2fe4e54c0084d54642eb3e (diff)
Add the ability to select missing files from Convert Dialog
Diffstat (limited to 'src/de/blinkt/openvpn/core')
-rw-r--r--src/de/blinkt/openvpn/core/NetworkSpace.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/de/blinkt/openvpn/core/NetworkSpace.java b/src/de/blinkt/openvpn/core/NetworkSpace.java
index 3701c43d..821565b8 100644
--- a/src/de/blinkt/openvpn/core/NetworkSpace.java
+++ b/src/de/blinkt/openvpn/core/NetworkSpace.java
@@ -87,9 +87,9 @@ public class NetworkSpace {
public String toString() {
//String in = included ? "+" : "-";
if (isV4)
- return String.format("%s/%d", getIPv4Address(), networkMask);
+ return String.format(Locale.US,"%s/%d", getIPv4Address(), networkMask);
else
- return String.format("%s/%d", getIPv6Address(), networkMask);
+ return String.format(Locale.US, "%s/%d", getIPv6Address(), networkMask);
}
ipAddress(BigInteger baseAddress, int mask, boolean included, boolean isV4) {
@@ -112,7 +112,7 @@ public class NetworkSpace {
assert (netAddress.longValue() <= 0xffffffffl);
assert (netAddress.longValue() >= 0);
long ip = netAddress.longValue();
- return String.format("%d.%d.%d.%d", (ip >> 24) % 256, (ip >> 16) % 256, (ip >> 8) % 256, ip % 256);
+ return String.format(Locale.US, "%d.%d.%d.%d", (ip >> 24) % 256, (ip >> 16) % 256, (ip >> 8) % 256, ip % 256);
}
String getIPv6Address() {
@@ -123,7 +123,7 @@ public class NetworkSpace {
Vector<String> parts = new Vector<String>();
while (r.compareTo(BigInteger.ZERO) == 1) {
- parts.add(0, String.format("%x", r.mod(BigInteger.valueOf(256)).longValue()));
+ parts.add(0, String.format(Locale.US, "%x", r.mod(BigInteger.valueOf(256)).longValue()));
r = r.shiftRight(16);
}