diff options
author | frosch <frosch@openttd.org> | 2010-04-14 19:56:29 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-04-14 19:56:29 +0000 |
commit | a929ab0c24826e80e01c59fe57b4c6087d59301c (patch) | |
tree | 3c9d19166333fb14cc7957a4dc1702af3632b886 /src | |
parent | 22f864b0c04384c9b3acae3a57108920d2f1d9a3 (diff) | |
download | openttd-a929ab0c24826e80e01c59fe57b4c6087d59301c.tar.xz |
(svn r19633) -Fix (r11759): Signed computations with unsigned integers.
Diffstat (limited to 'src')
-rw-r--r-- | src/terraform_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp index b98dc233d..2c45bcc45 100644 --- a/src/terraform_cmd.cpp +++ b/src/terraform_cmd.cpp @@ -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); |