Reference: http://forum.simutrans.com/index.php?topic=1601.msg16748#msg16748 (http://forum.simutrans.com/index.php?topic=1601.msg16748#msg16748) (I didn't want to break that topic).
What's the usage of the parameter max_chars overall? It's only called with max_chars=512... And when you now add a new call to this function with another max_chars, things will break again...
My suggestions are:
- remove this parameter
- or use 'char* tmp = new char[max_chars];'
Edit:
Why is the index i and the schedule ptr fpl p****ed to the functions gimme_[short_]stop_name? IMHO it's sufficient to p**** only a linieneintrag_t to this functions.
one can also use cbuffer_t::printf in fahrplan_gui_t::gimme_stop_name.
Just make a patch :)
Ok. Patch attached :)
Since the name of a halt cannot exceed 256 chars (see gui/halt_info.*), the '...' aren't needed.
Edit: Patch really attached...
The linieneintrag came after this function. (However, I am not sure svn has this old revision.) The reason is completely historical.