max_chars in gimme_stop_name March 04, 2009, 08:04:14 am Reference: 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. Quote Selected Last Edit: March 04, 2009, 08:12:56 am by gerw
Re: max_chars in gimme_stop_name Reply #1 – March 04, 2009, 08:21:44 am one can also use cbuffer_t::printf in fahrplan_gui_t::gimme_stop_name.Just make a patch Quote Selected
Re: max_chars in gimme_stop_name Reply #2 – March 04, 2009, 08:51:22 am 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... Quote Selected
Re: max_chars in gimme_stop_name Reply #3 – March 04, 2009, 09:59:14 am The linieneintrag came after this function. (However, I am not sure svn has this old revision.) The reason is completely historical. Quote Selected