mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r19633) -Fix (r11759): Signed computations with unsigned integers.
This commit is contained in:
parent
22f864b0c0
commit
a929ab0c24
@ -372,7 +372,7 @@ CommandCost CmdLevelLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
uint oldh = TileHeight(p1);
|
||||
|
||||
/* compute new height */
|
||||
uint h = oldh + p2;
|
||||
uint h = oldh + (int8)p2;
|
||||
|
||||
/* Check range of destination height */
|
||||
if (h > MAX_TILE_HEIGHT) return_cmd_error((oldh == 0) ? STR_ERROR_ALREADY_AT_SEA_LEVEL : STR_ERROR_TOO_HIGH);
|
||||
|
Loading…
Reference in New Issue
Block a user