diff options
author | Vicent Marti | 2008-07-21 09:53:06 +0000 |
---|---|---|
committer | Vicent Marti | 2008-07-21 09:53:06 +0000 |
commit | 89a21f1613cfe9ded3de22c5d4261ed40a39a1c3 (patch) | |
tree | ad667bc514495f89afcbbd93faf28d734603e56b /gui | |
parent | 5a4fcb83e24829334f12b046c120f200792f0ea9 (diff) | |
download | scummvm-rg350-89a21f1613cfe9ded3de22c5d4261ed40a39a1c3.tar.gz scummvm-rg350-89a21f1613cfe9ded3de22c5d4261ed40a39a1c3.tar.bz2 scummvm-rg350-89a21f1613cfe9ded3de22c5d4261ed40a39a1c3.zip |
Valgrind fix: Invalid read/write while restoring background
svn-id: r33166
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeRenderer.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/gui/ThemeRenderer.cpp b/gui/ThemeRenderer.cpp index b287406ba5..b7483b810d 100644 --- a/gui/ThemeRenderer.cpp +++ b/gui/ThemeRenderer.cpp @@ -388,19 +388,7 @@ void ThemeRenderer::calcBackgroundOffset(DrawData type) { } void ThemeRenderer::restoreBackground(Common::Rect r, bool special) { - const OverlayColor *src = (const OverlayColor*)_backBuffer->getBasePtr(r.left, r.top); - OverlayColor *dst = (OverlayColor*)_screen->getBasePtr(r.left, r.top); - - int h = r.height(); - int w = r.width(); - while (h--) { - memcpy(dst, src, w * sizeof(OverlayColor)); - src += _backBuffer->w; - dst += _screen->w; - } - -// debugWidgetPosition("", r); -// printf(" BG_RESTORE "); + _vectorRenderer->blitSurface(_backBuffer, r); } void ThemeRenderer::drawButton(const Common::Rect &r, const Common::String &str, WidgetStateInfo state, uint16 hints) { |