Fix transport reader

This commit is contained in:
Victor Shcherb 2020-06-25 12:41:30 +02:00
parent bc25f22ca2
commit cf67a55b36
2 changed files with 5 additions and 5 deletions

View file

@ -2660,8 +2660,10 @@ public class BinaryMapIndexReader {
incompleteTransportRoutes = new TLongObjectHashMap<>();
for (TransportIndex ti : transportIndexes) {
if (ti.incompleteRoutesLength > 0) {
transportAdapter.readIncompleteRoutesList(incompleteTransportRoutes, ti.incompleteRoutesLength,
ti.incompleteRoutesOffset);
codedIS.seek(ti.incompleteRoutesOffset);
int oldLimit = codedIS.pushLimit(ti.incompleteRoutesLength);
transportAdapter.readIncompleteRoutesList(incompleteTransportRoutes);
codedIS.popLimit(oldLimit);
}
}
}

View file

@ -251,9 +251,7 @@ public class BinaryMapTransportReaderAdapter {
return ((char) i)+"";
}
public void readIncompleteRoutesList(TLongObjectHashMap<net.osmand.data.IncompleteTransportRoute> incompleteRoutes,
int length, int offset) throws IOException {
codedIS.seek(offset);
public void readIncompleteRoutesList(TLongObjectHashMap<net.osmand.data.IncompleteTransportRoute> incompleteRoutes) throws IOException {
boolean end = false;
while (!end) {
int t = codedIS.readTag();