diff options
author | Johannes Schickel | 2009-10-17 22:47:21 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-10-17 22:47:21 +0000 |
commit | f62f3eea89afd5620e1ef411232d74c7999f4971 (patch) | |
tree | 3b85673473c9636076e5344a146e5ad8e3b8e2a7 /engines/kyra | |
parent | 7fed4643e2e96edba97729ae4647a070f8db016f (diff) | |
download | scummvm-rg350-f62f3eea89afd5620e1ef411232d74c7999f4971.tar.gz scummvm-rg350-f62f3eea89afd5620e1ef411232d74c7999f4971.tar.bz2 scummvm-rg350-f62f3eea89afd5620e1ef411232d74c7999f4971.zip |
Fix valgrind warning.
svn-id: r45207
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/screen.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 9216b5e432..f190c6ab3d 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -3438,13 +3438,10 @@ void Palette::copy(const Palette &source, int firstCol, int numCols, int dstStar assert(firstCol >= 0 && firstCol <= source.getNumColors()); assert(dstStart >= 0 && dstStart + numCols <= _numColors); - memcpy(_palData + dstStart * 3, source._palData + firstCol * 3, numCols * 3); + memmove(_palData + dstStart * 3, source._palData + firstCol * 3, numCols * 3); } void Palette::copy(const uint8 *source, int firstCol, int numCols, int dstStart) { - if (source == _palData) - return; - if (dstStart == -1) dstStart = firstCol; @@ -3452,7 +3449,7 @@ void Palette::copy(const uint8 *source, int firstCol, int numCols, int dstStart) assert(firstCol >= 0); assert(dstStart >= 0 && dstStart + numCols <= _numColors); - memcpy(_palData + dstStart * 3, source + firstCol * 3, numCols * 3); + memmove(_palData + dstStart * 3, source + firstCol * 3, numCols * 3); } uint8 *Palette::fetchRealPalette() const { |