Bump expected JMdict version and decoding.
app/src/main/java/eu/lepiller/nani/dictionary/FileDictionary.java
167 | 167 | ArrayList<Integer> results = new ArrayList<>(); | |
168 | 168 | int number = file.readShort(); | |
169 | 169 | for(int i=0; i<number; i++) { | |
170 | - | results.add((int) file.readByte()); | |
170 | + | int tag = (int) file.readShort(); | |
171 | + | results.add(tag); | |
171 | 172 | } | |
172 | 173 | return results; | |
173 | 174 | } |
app/src/main/java/eu/lepiller/nani/dictionary/ResultDictionary.java
126 | 126 | return null; | |
127 | 127 | ||
128 | 128 | // Check file format version | |
129 | - | if(!Arrays.equals(header, "NANI_JMDICT001".getBytes())) | |
129 | + | if(!Arrays.equals(header, "NANI_JMDICT002".getBytes())) | |
130 | 130 | throw new IncompatibleFormatException(getName()); | |
131 | 131 | ||
132 | 132 | byte[] search = text.getBytes(); |