Fix out-of-bounds array access in bucket fill
This commit is contained in:
parent
36a6212af6
commit
3c2aa5d2e9
1 changed files with 1 additions and 2 deletions
|
@ -488,13 +488,12 @@ void MapPixmapItem::floodFill(
|
|||
QPoint point = todo.takeAt(0);
|
||||
int x = point.x();
|
||||
int y = point.y();
|
||||
visited[x + y * map->getWidth()] = true;
|
||||
|
||||
Block *block = map->getBlock(x, y);
|
||||
if (!block) {
|
||||
continue;
|
||||
}
|
||||
|
||||
visited[x + y * map->getWidth()] = true;
|
||||
int xDiff = x - initialX;
|
||||
int yDiff = y - initialY;
|
||||
int i = xDiff % selectionDimensions.x();
|
||||
|
|
Loading…
Reference in a new issue