diff options
author | Torbjörn Andersson | 2011-11-27 08:40:12 +0100 |
---|---|---|
committer | Torbjörn Andersson | 2011-11-27 08:40:12 +0100 |
commit | 6e9fe4e365d05d9c3776c266aac3dc35a537f875 (patch) | |
tree | d9eba710766d40fbf2fb9c2f024098f0fc60c46c | |
parent | da626f786d30c59002cbd4348f01a759ae55d75c (diff) | |
download | scummvm-rg350-6e9fe4e365d05d9c3776c266aac3dc35a537f875.tar.gz scummvm-rg350-6e9fe4e365d05d9c3776c266aac3dc35a537f875.tar.bz2 scummvm-rg350-6e9fe4e365d05d9c3776c266aac3dc35a537f875.zip |
CGE: Fix mismatched free() / delete / delete [] Valgrind warning.
-rw-r--r-- | engines/cge/bitmap.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp index 0e599cc05b..4b5034756c 100644 --- a/engines/cge/bitmap.cpp +++ b/engines/cge/bitmap.cpp @@ -136,7 +136,7 @@ Bitmap &Bitmap::operator=(const Bitmap &bmp) { } else { uint16 vsiz = (uint8 *)bmp._b - (uint8 *)v0; uint16 siz = vsiz + _h * sizeof(HideDesc); - uint8 *v1 = (uint8 *)malloc(sizeof(uint8) * siz); + uint8 *v1 = new uint8[siz]; assert(v1 != NULL); memcpy(v1, v0, siz); _b = (HideDesc *)((_v = v1) + vsiz); |