diff options
author | athrxx | 2011-07-01 17:05:39 +0200 |
---|---|---|
committer | athrxx | 2011-07-03 14:40:55 +0200 |
commit | 90fa4cf15fe82b36c9374596ab955eea0939fc8f (patch) | |
tree | 16d2e3a9dbb5fde5451619f1008184cdd23ab800 /engines/kyra | |
parent | d7f50b925e1d03416638d38195137401c45d8a2d (diff) | |
download | scummvm-rg350-90fa4cf15fe82b36c9374596ab955eea0939fc8f.tar.gz scummvm-rg350-90fa4cf15fe82b36c9374596ab955eea0939fc8f.tar.bz2 scummvm-rg350-90fa4cf15fe82b36c9374596ab955eea0939fc8f.zip |
KYRA: formatting
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/debugger.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp index e8dd9e9a15..4a48ac0674 100644 --- a/engines/kyra/debugger.cpp +++ b/engines/kyra/debugger.cpp @@ -71,7 +71,7 @@ bool Debugger::cmd_loadPalette(int argc, const char **argv) { } if (_vm->game() != GI_KYRA1 && _vm->resource()->getFileSize(argv[1]) != 768) { - uint8 *buffer = (uint8 *)malloc(320 * 200 * sizeof(uint8)); + uint8 *buffer = new uint8[320 * 200 * sizeof(uint8)]; if (!buffer) { DebugPrintf("ERROR: Cannot allocate buffer for screen region!\n"); return true; @@ -82,7 +82,7 @@ bool Debugger::cmd_loadPalette(int argc, const char **argv) { palette.copy(_vm->screen()->getCPagePtr(5), 0, 256); _vm->screen()->copyBlockToPage(5, 0, 0, 320, 200, buffer); - free(buffer); + delete[] buffer; } else if (!_vm->screen()->loadPalette(argv[1], palette)) { DebugPrintf("ERROR: Palette '%s' not found!\n", argv[1]); return true; |