Skip to content

Conversation

@yakra
Copy link
Contributor

@yakra yakra commented Feb 1, 2026

Came across this while using valgrind to troubleshoot something unrelated.

If there are 0 valid .csv lines, siteupdate goes on to allocate a block of 0 B for the routes and/or con_routes arrays.
Which is implementation-defined behavior. Wacky antics may ensue.

Sure, I could just skip the allocation, create a HighwaySystem object with 0 routes, and move on without complaining. But ISTM that's just bad juju. Seems that's just asking for a division by 0 error somewhere down the line. What if a 0-route system is in systems.csv as active or preview?

Making this an ErrorList item is The Right Thing To Do.

Nota Bene:

This flags both inddl.csv & inddl_con.csv.
The quickest & easiest solution is to comment inddl out in systems.csv.

interactive rebase 81d48f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant