app: fix #12867 crash when exporting grayscale .gih
With a cell size half the width of a grayscale image with an alpha channel, we get a crash because we write outside our buffer. When computing the offset in the buffer, we added the offset of the tile, but since we are just writing this tile. We should not add that offset.
This commit is contained in:
parent
5b6f1b481a
commit
a8b30b17d7
1 changed files with 2 additions and 2 deletions
|
|
@ -314,8 +314,8 @@ file_gbr_drawable_to_brush (GimpDrawable *drawable,
|
|||
if (data[1] < 1.0)
|
||||
data[0] = (1.0 - data[1]) + (data[0] * data[1]);
|
||||
|
||||
x = iter->items[0].roi.x + j % iter->items[0].roi.width;
|
||||
y = iter->items[0].roi.y + j / iter->items[0].roi.width;
|
||||
x = j % iter->items[0].roi.width;
|
||||
y = j / iter->items[0].roi.width;
|
||||
|
||||
dest = y * width + x;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue