Mercurial > hg > openttd
changeset 15018:473c5cfc4d3d draft
(svn r19633) -Fix (r11759): Signed computations with unsigned integers.
author | frosch <frosch@openttd.org> |
---|---|
date | Wed, 14 Apr 2010 19:56:29 +0000 |
parents | b7446f6e1b69 |
children | 26df377a8d35 |
files | src/terraform_cmd.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/terraform_cmd.cpp +++ b/src/terraform_cmd.cpp @@ -372,7 +372,7 @@ 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);