Skip to content

Commit 9683056

Browse files
authored
Update Reader.java
1 parent b63640d commit 9683056

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/net/ipip/ipdb/Reader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public String[] find(String addr, String language) throws IPFormatException, Inv
9595

9696
byte[] ipv;
9797

98-
if (addr.indexOf(":") > 0) {
98+
if (addr.indexOf(":") >= 0) {
9999
ipv = IPAddressUtil.textToNumericFormatV6(addr);
100100
if (ipv == null) {
101101
throw new IPFormatException("ipv6 format error");
@@ -220,4 +220,4 @@ public String[] getSupportFields() {
220220
public String getSupportLanguages() {
221221
return this.meta.Languages.keySet().toString();
222222
}
223-
}
223+
}

0 commit comments

Comments
 (0)