(svn r19633) -Fix (r11759): Signed computations with unsigned integers.

This commit is contained in:
frosch 2010-04-14 19:56:29 +00:00
parent 22f864b0c0
commit a929ab0c24
1 changed files with 1 additions and 1 deletions

View File

@ -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);