This commit is contained in:
lion 2023-02-05 18:52:40 +08:00
parent a4b39f5315
commit 3fef2a2fad
4 changed files with 9 additions and 5 deletions

View File

@ -4,7 +4,7 @@
<groupId>org.lionsoul</groupId>
<artifactId>ip2region</artifactId>
<version>2.6.6</version>
<version>2.7.0</version>
<packaging>jar</packaging>
<name>ip2region</name>
@ -41,6 +41,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
<dependencies>

View File

@ -235,8 +235,8 @@ public class Searcher {
public static int getInt2(byte[] b, int offset) {
return (
(b[offset++] & 0x000000FF) |
(b[offset ] & 0x0000FF00)
((b[offset++] & 0x000000FF)) |
((b[offset ] << 8) & 0x0000FF00)
);
}

View File

@ -41,6 +41,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
<dependencies>

View File

@ -36,8 +36,8 @@ public class Util
public static int getInt2(byte[] b, int offset) {
return (
(b[offset++] & 0x000000FF) |
(b[offset ] & 0x0000FF00)
((b[offset++]) & 0x000000FF) |
((b[offset ] << 8) & 0x0000FF00)
);
}