(svn r27160) -Fix: Division of signed values by TILE_SIZE requires cast to stay signed.

This commit is contained in:
frosch
2015-02-22 14:14:30 +00:00
parent 7dee16a9b9
commit d35670aa2a
2 changed files with 2 additions and 2 deletions

View File

@@ -847,7 +847,7 @@ void SmallMapWindow::DrawVehicles(const DrawPixelInfo *dpi, Blitter *blitter) co
if (v->vehstatus & (VS_HIDDEN | VS_UNCLICKABLE)) continue;
/* Remap into flat coordinates. */
Point pt = this->RemapTile(v->x_pos / TILE_SIZE, v->y_pos / TILE_SIZE);
Point pt = this->RemapTile(v->x_pos / (int)TILE_SIZE, v->y_pos / (int)TILE_SIZE);
int y = pt.y - dpi->top;
if (!IsInsideMM(y, 0, dpi->height)) continue; // y is out of bounds.