diff options
author | Torbjörn Andersson | 2019-02-28 19:58:54 +0100 |
---|---|---|
committer | Torbjörn Andersson | 2019-02-28 19:58:54 +0100 |
commit | d86bb46a85197fc75d82dbb97f8d541107e51ca1 (patch) | |
tree | 528c9f990b6ec051222f4f11e86ac1d6a2f9d530 /engines | |
parent | 7ecf25559868f168afc465850329478a28310923 (diff) | |
download | scummvm-rg350-d86bb46a85197fc75d82dbb97f8d541107e51ca1.tar.gz scummvm-rg350-d86bb46a85197fc75d82dbb97f8d541107e51ca1.tar.bz2 scummvm-rg350-d86bb46a85197fc75d82dbb97f8d541107e51ca1.zip |
GLK: Use delete[] instead of free() to free _lineTerminators
Diffstat (limited to 'engines')
-rw-r--r-- | engines/glk/window_text_buffer.cpp | 2 | ||||
-rw-r--r-- | engines/glk/window_text_grid.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/glk/window_text_buffer.cpp b/engines/glk/window_text_buffer.cpp index b27fb36661..788f8caea5 100644 --- a/engines/glk/window_text_buffer.cpp +++ b/engines/glk/window_text_buffer.cpp @@ -1446,7 +1446,7 @@ void TextBufferWindow::acceptLine(uint32 keycode) { _echoLineInput = false; g_vm->_events->store(evtype_LineInput, this, len, keycode); - free(_lineTerminators); + delete[] _lineTerminators; _lineTerminators = nullptr; } else { g_vm->_events->store(evtype_LineInput, this, len, 0); diff --git a/engines/glk/window_text_grid.cpp b/engines/glk/window_text_grid.cpp index 971d35a0bb..be097251fc 100644 --- a/engines/glk/window_text_grid.cpp +++ b/engines/glk/window_text_grid.cpp @@ -370,7 +370,7 @@ void TextGridWindow::cancelLineEvent(Event *ev) { _lineRequestUni = false; if (_lineTerminators) { - free(_lineTerminators); + delete[] _lineTerminators; _lineTerminators = nullptr; } @@ -443,7 +443,7 @@ void TextGridWindow::acceptLine(uint32 keycode) { if (val2 == keycode_Return) val2 = 0; g_vm->_events->store(evtype_LineInput, this, _inLen, val2); - free(_lineTerminators); + delete[] _lineTerminators; _lineTerminators = nullptr; } else { g_vm->_events->store(evtype_LineInput, this, _inLen, 0); |