mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-06 22:37:22 +00:00
(svn r8273) -Fix: return value from clamp was ignored
This commit is contained in:
parent
6230f9b922
commit
314e35beff
@ -1885,7 +1885,7 @@ static void CheatsWndProc(Window *w, WindowEvent *e)
|
|||||||
|
|
||||||
/* Increase or decrease the value and clamp it to extremes */
|
/* Increase or decrease the value and clamp it to extremes */
|
||||||
value += (x >= 30) ? step : -step;
|
value += (x >= 30) ? step : -step;
|
||||||
clamp(value, ce->min, ce->max);
|
value = clamp(value, ce->min, ce->max);
|
||||||
|
|
||||||
// take whatever the function returns
|
// take whatever the function returns
|
||||||
value = ce->proc(value, (x >= 30) ? 1 : -1);
|
value = ce->proc(value, (x >= 30) ? 1 : -1);
|
||||||
|
Loading…
Reference in New Issue
Block a user