列车运行图例,报错修复
CI / Docker-Build (push) Successful in 4m35s Details

This commit is contained in:
tiger_zhou 2024-10-10 17:57:59 +08:00
parent 81074bbb2a
commit 3c9aeb82f6
1 changed files with 8 additions and 1 deletions

View File

@ -46,7 +46,14 @@ public class SortDiagramStation {
private Station findNotDepotStation(boolean isRight, int index) {
Station station = stationList.get(index);
Station station = null;
if (index >= stationList.size()) {
station = stationList.get(stationList.size() - 1);
} else if (index <= 0) {
station = stationList.get(0);
} else {
station = stationList.get(index);
}
while (station.isDepot()) {
index += isRight ? -1 : 1;
station = stationList.get(index);