diff options
author | tron <tron@openttd.org> | 2006-03-03 19:42:09 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-03 19:42:09 +0000 |
commit | d85178166324d5d5183ee0f3c1d295a85534d708 (patch) | |
tree | 33b8df8ca1efa38a8227dd2ec34da277aed9c554 /rail_gui.c | |
parent | eeb2b7cd11e67ba35ed5ec51cd84ae1cd41b413b (diff) | |
download | openttd-d85178166324d5d5183ee0f3c1d295a85534d708.tar.xz |
(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)
Diffstat (limited to 'rail_gui.c')
-rw-r--r-- | rail_gui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rail_gui.c b/rail_gui.c index 16b764f9a..61d2375e9 100644 --- a/rail_gui.c +++ b/rail_gui.c @@ -291,8 +291,8 @@ static void BuildRailClick_Remove(Window *w) SndPlayFx(SND_15_BEEP); TOGGLEBIT(w->click_state, 16); - _remove_button_clicked = HASBIT(w->click_state, 16) != 0; - SetSelectionRed(HASBIT(w->click_state, 16) != 0); + _remove_button_clicked = HASBIT(w->click_state, 16); + SetSelectionRed(HASBIT(w->click_state, 16)); // handle station builder if (HASBIT(w->click_state, 16)) { |