diff options
author | Eugene Sandulenko | 2016-01-30 23:53:52 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:12:56 +0100 |
commit | e41c3c50de4e1b077806b605466b5f01c9cb42c5 (patch) | |
tree | 68562d50f9d3f8f0f574ead4b09ff1d567220272 | |
parent | cedee5b3d9bd6f1c99949347f49d799a9abc2f61 (diff) | |
download | scummvm-rg350-e41c3c50de4e1b077806b605466b5f01c9cb42c5.tar.gz scummvm-rg350-e41c3c50de4e1b077806b605466b5f01c9cb42c5.tar.bz2 scummvm-rg350-e41c3c50de4e1b077806b605466b5f01c9cb42c5.zip |
WAGE: Fix crash in Deep Angst, when border is beyond the screen
-rw-r--r-- | engines/wage/gui.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 354616b470..ad212f2166 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -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); } |