News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Fix for crash in ai_passenger

Started by dlichtenberger, April 26, 2012, 09:11:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dlichtenberger

Hi,

Here's a patch that fixes a segfault that kept occuring on my map using the passenger AI. end_stadt is assumed to be set in a call to create_air_transport_vehikel, when it can be actually NULL at that point. There is at least one other dubious unchecked read (around line 1173), code :

buf.printf( translator::translate("Travellers now\nuse %s's\nbusses between\n%s \nand %s.\n"), get_name(), start_stadt->get_name(), end_stadt->get_name() );

but it's hard to follow the logic in general, so it might be OK. Only the line fixed in my patch actually triggered segfaults on my system.

Cheers
Daniel

prissi