Skip to content

Commit

Permalink
WAGE: Fix crash in Deep Angst, when border is beyond the screen
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Feb 14, 2016
1 parent cedee5b commit e41c3c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions engines/wage/gui.cpp
Expand Up @@ -398,6 +398,11 @@ void Gui::paintBorder(Graphics::Surface *g, Common::Rect &r, WindowType windowTy
font->drawString(g, _scene->_name, x + (width - w) / 2 + 5, y + yOff, w, kColorBlack);
}

if (x + width > _screen.w)
width = _screen.w - x;
if (y + height > _screen.h)
height = _screen.h - y;

g_system->copyRectToScreen(g->getBasePtr(x, y), g->pitch, x, y, width, height);
}

Expand Down

0 comments on commit e41c3c5

Please sign in to comment.