(svn r19671) -Fix (r19670): RoundDiv() needs to deal with signed numerators.

This commit is contained in:
frosch
2010-04-18 17:13:01 +00:00
parent 2e90f7f8b9
commit af7051178d
3 changed files with 13 additions and 7 deletions

View File

@@ -649,8 +649,8 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
{
if (widget != ETTW_DOTS) return;
int center_x = RoundDiv(r.left + r.right, 2);
int center_y = RoundDiv(r.top + r.bottom, 2);
int center_x = RoundDivSU(r.left + r.right, 2);
int center_y = RoundDivSU(r.top + r.bottom, 2);
int n = _terraform_size * _terraform_size;
const int8 *coords = &_multi_terraform_coords[0][0];