Skip to content

Commit c4484a1

Browse files
committed
Fix a bug which LovelyZeeiam has pointed out
1 parent 300dd96 commit c4484a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

io/github/javaherobrine/TrieNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
package io.github.javaherobrine;
2-
32
import java.io.*;
43
public class TrieNode {
54
private TrieNode[] linkto=new TrieNode[256];
@@ -32,6 +31,9 @@ public Object access(InputStream in,int split) throws IOException{
3231
TrieNode node=this;
3332
Object res=null;
3433
int ch=in.read();
34+
if(ch<0) {
35+
ch+=256;
36+
}
3537
while(ch!=split) {
3638
node=node.linkto[ch];
3739
if(node==null) {

0 commit comments

Comments
 (0)