Skip to content
Permalink
Browse files
(svn r19633) -Fix (r11759): Signed computations with unsigned integers.
  • Loading branch information
frosch123 committed Apr 14, 2010
1 parent 22f864b commit a929ab0c24826e80e01c59fe57b4c6087d59301c
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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);

0 comments on commit a929ab0

Please sign in to comment.