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);
|
QPoint point = todo.takeAt(0);
|
||||||
int x = point.x();
|
int x = point.x();
|
||||||
int y = point.y();
|
int y = point.y();
|
||||||
visited[x + y * map->getWidth()] = true;
|
|
||||||
|
|
||||||
Block *block = map->getBlock(x, y);
|
Block *block = map->getBlock(x, y);
|
||||||
if (!block) {
|
if (!block) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
visited[x + y * map->getWidth()] = true;
|
||||||
int xDiff = x - initialX;
|
int xDiff = x - initialX;
|
||||||
int yDiff = y - initialY;
|
int yDiff = y - initialY;
|
||||||
int i = xDiff % selectionDimensions.x();
|
int i = xDiff % selectionDimensions.x();
|
||||||
|
|
Loading…
Reference in a new issue