(svn r14397) -Fix: possible buffer overrun, wrong parameter type passed to printf and && where || is meant. Found by MSVC's code analysis (Darkvater)

This commit is contained in:
rubidium
2008-09-24 23:25:24 +00:00
parent 4057132b00
commit 48ece47bd9
3 changed files with 6 additions and 6 deletions

View File

@@ -2747,7 +2747,7 @@ static PBSTileInfo ExtendTrainReservation(const Vehicle *v, TrackBits *new_track
if (!TryReserveRailTrack(tile, TrackdirToTrack(cur_td))) break;
}
if (ft.m_err == CFollowTrackRail::EC_OWNER && ft.m_err == CFollowTrackRail::EC_NO_WAY) {
if (ft.m_err == CFollowTrackRail::EC_OWNER || ft.m_err == CFollowTrackRail::EC_NO_WAY) {
/* End of line, path valid and okay. */
return PBSTileInfo(ft.m_old_tile, ft.m_old_td, true);
}