diff options
author | lukaslw | 2014-08-18 22:03:50 +0200 |
---|---|---|
committer | lukaslw | 2014-08-18 22:03:50 +0200 |
commit | afe47b014a0538171e826c780f198a19df60bd69 (patch) | |
tree | a87b52e0c9c55b8d52882a9d1ba3d753c40a49a1 /engines | |
parent | 01bf821e176ade6d74270450cbdcd3eea51686a8 (diff) | |
download | scummvm-rg350-afe47b014a0538171e826c780f198a19df60bd69.tar.gz scummvm-rg350-afe47b014a0538171e826c780f198a19df60bd69.tar.bz2 scummvm-rg350-afe47b014a0538171e826c780f198a19df60bd69.zip |
PRINCE: drawTransparentWithTrans - memory leak fix
Diffstat (limited to 'engines')
-rw-r--r-- | engines/prince/graphics.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/prince/graphics.cpp b/engines/prince/graphics.cpp index d70591d2cc..2f021fe223 100644 --- a/engines/prince/graphics.cpp +++ b/engines/prince/graphics.cpp @@ -200,7 +200,11 @@ void GraphicsMan::drawTransparentWithTransDrawNode(Graphics::Surface *screen, Dr } } } - } else if (*(src2 + 1) == 255) { + } else if (x != drawNode->s->w - 1) { + if (*(src2 + 1) == 255) { + continue; + } + } else { continue; } byte value = 0; @@ -216,11 +220,13 @@ void GraphicsMan::drawTransparentWithTransDrawNode(Graphics::Surface *screen, Dr continue; } } - } else { + } else if (y) { value = *(src2 - drawNode->s->pitch); if (value == 255) { continue; } + } else { + continue; } *dst2 = transTableData[*dst2 * 256 + value]; } |