Fix inconsistence between path reader and writer.
这个提交包含在:
父节点
ca9a00ea97
当前提交
23b46fd4bc
共有 1 个文件被更改,包括 2 次插入 和 6 次删除
|
@ -35,8 +35,7 @@ public class BinaryPathReader extends BinaryReader implements PathReader {
|
|||
checkVersionOrThrow(dis.readInt());
|
||||
|
||||
// Read map ID and check against graph.
|
||||
String mapId = readFixedLengthString(BinaryGraphReader.MAP_ID_FIELD_LENGTH,
|
||||
"UTF-8");
|
||||
String mapId = readFixedLengthString(BinaryGraphReader.MAP_ID_FIELD_LENGTH, "UTF-8");
|
||||
|
||||
if (!mapId.equals(graph.getMapId())) {
|
||||
throw new MapMismatchException(mapId, graph.getMapId());
|
||||
|
@ -69,10 +68,7 @@ public class BinaryPathReader extends BinaryReader implements PathReader {
|
|||
* @throws IndexOutOfBoundsException if the node is not in the graph.
|
||||
*/
|
||||
protected Node readNode(Graph graph) throws IOException {
|
||||
// Discard zone.
|
||||
dis.readUnsignedByte();
|
||||
|
||||
return graph.getNodes().get(read24bits());
|
||||
return graph.getNodes().get(dis.readInt());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
正在加载…
在新工单中引用