(svn r3747) Change HASBIT() to return 0/1 instead of 0/value of tested bit, because the name suggests it does the former and current behavior broke in some places in very subtle ways (for example HASBIT(x, 0) != HASBIT(y, 1) doesn't work, returning a bool after HASBIT(x, 9) neither)

This commit is contained in:
tron
2006-03-03 19:42:09 +00:00
parent 5b0e6f90a9
commit 40fd4377b0
6 changed files with 8 additions and 8 deletions

2
rail.h
View File

@@ -557,7 +557,7 @@ static inline SignalType GetSignalType(TileIndex tile, Track track)
static inline bool HasSemaphores(TileIndex tile, Track track)
{
assert(IsValidTrack(track));
return _m[tile].m4 & SIG_SEMAPHORE_MASK;
return (_m[tile].m4 & SIG_SEMAPHORE_MASK) != 0;
}
/**