aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/window_text_grid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/window_text_grid.cpp')
-rw-r--r--engines/glk/window_text_grid.cpp4
1 files changed, 2 insertions, 2 deletions
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);