fix: code correctness, security, and simplicity improvements

This commit is contained in:
Mrixs committed 2026-08-13 21:23:15 +03:00
1 parent ac6efb45d8
commit e063d26d4c
5 files changed
+78 -40

No files matched your search

+3 -3
View File
@@ -253,11 +253,11 @@ func (g *Graph) FindRoute(originID, destID string, opts SearchOptions) *Itinerar
newDurationWithMCT := newDuration + transferTime
// Check if we've visited this node with fewer or equal transfers
// Check if we've visited this node with fewer transfers
visKey := current.nodeID
if existingTransfers, ok := visited[visKey]; ok {
if current.transfers+1 >= existingTransfers {
// Already visited this node with fewer or equal transfers, skip
if current.transfers+1 > existingTransfers {
// Already visited this node with fewer transfers, skip
continue
}
}