Page 1 of 1

[0.15.34] Train stops with space in name are invisible

Posted: Sat Aug 26, 2017 6:06 pm
by daniel34
In a train system, rename a train stop to "as df" and another one to "asdf". In the train selection dialog only the "asdf" one will be visible.

However the "asdf" train only stops at train stops that are actually named "asdf", it won't stop at train stops named "as df". It is impossible to make a train go to the "as df" stop because it is not listed, unless it has been set up to do so before the "asdf" stop was built (or renamed).

Here's an example:
bug_station_names.zip
(2.37 MiB) Downloaded 144 times
The stop at the top is named "asdf" and the bottom one "as df". It is impossible to make the train go to the bottom stop, because it is not listed when you try to add that stop.

Re: [0.15.34] Train stops with space in name are invisible

Posted: Sun Aug 27, 2017 7:58 am
by Jon8RFC
I tested on my own save and notice the same circumstance, but the opposite problem. Maybe it's because I named them in a different sequence. The one named "asdf", without a space, is the one invisible and unusable for me. The one named "as df", with a space, is the one I could add to my train's list of stops and which it successfully went to.

Re: [0.15.34] Train stops with space in name are invisible

Posted: Mon Aug 28, 2017 3:03 pm
by kovarex
Hello, thanks for the report.
It is indeed a bug in our "smart string comparison function", which, instead of skipping trailing spaces skips all spaces.
Fixed for 0.16

Re: [0.15.34] Train stops with space in name are invisible

Posted: Mon Aug 28, 2017 3:54 pm
by steinio
kovarex wrote:Hello, thanks for the report.
It is indeed a bug in our "smart string comparison function", which, instead of skipping trailing spaces skips all spaces.
Fixed for 0.16
lol

Has C++ no vanilla string functions including trim?

Re: [0.15.34] Train stops with space in name are invisible

Posted: Tue Aug 29, 2017 7:42 am
by Rseding91
steinio wrote:
kovarex wrote:Hello, thanks for the report.
It is indeed a bug in our "smart string comparison function", which, instead of skipping trailing spaces skips all spaces.
Fixed for 0.16
lol

Has C++ no vanilla string functions including trim?
c++ doesn't have https://www.npmjs.com/package/string-natural-compare