Skip to content

Commit b78ec23

Browse files
StephenCWillsAJenbo
authored andcommitted
Fix bounds check in RenderClxOutline()
1 parent d7b5a0c commit b78ec23

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Source/engine/render/clx_render.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ void RenderClxOutline(const Surface &out, Point position, ClxSprite sprite, uint
405405
UpdateOutlinePixelsCache<SkipColorIndexZero>(sprite);
406406
--position.x;
407407
position.y -= sprite.height();
408-
if (position.x >= 0 && position.x + sprite.width() < out.w()
409-
&& position.y >= 0 && position.y + sprite.height() < out.h()) {
408+
if (position.x >= 0 && position.x + sprite.width() + 2 < out.w()
409+
&& position.y >= 0 && position.y + sprite.height() + 2 < out.h()) {
410410
for (const auto &[x, y] : OutlinePixelsCache.outlinePixels) {
411411
*out.at(position.x + x, position.y + y) = color;
412412
}

0 commit comments

Comments
 (0)