News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Suspicious condition in dataobj/route.cc

Started by ij, January 15, 2015, 09:02:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ij

Is there perhaps bug close to the end of this line:

https://github.com/aburch/simutrans/blob/master/dataobj/route.cc#L663

The use of doubled && instead of & in this subcondition looks extremely suspicious: ... &&  (fahr->get_ribi(gr)&&ribi)!=0  ) ...I guess it would be supposed to check if fahr->get_ribi(gr) has ribi bit set.

--
i.


Ters

Looks wrong to me as well. If it was supposed to be &&, I doubt there would be an != after. Although the != is unnecessary in C/C++, here it indeed strongly suggest flags checking.

prissi

Hmm this line is not 663. I assume this has been fixed?

Ters