aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorMartin Kiewitz2010-09-04 10:39:22 +0000
committerMartin Kiewitz2010-09-04 10:39:22 +0000
commite7f834e1030fadd0bc8dd0ace0a0f2c47e5765ba (patch)
treef097ecebf742f4938da106b1300c7aef9d80862f /engines/sci/graphics
parentafada2b60d636e21000e8bde3b760241afb1a223 (diff)
downloadscummvm-rg350-e7f834e1030fadd0bc8dd0ace0a0f2c47e5765ba.tar.gz
scummvm-rg350-e7f834e1030fadd0bc8dd0ace0a0f2c47e5765ba.tar.bz2
scummvm-rg350-e7f834e1030fadd0bc8dd0ace0a0f2c47e5765ba.zip
SCI: delete on textedit control now checks string
svn-id: r52518
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/controls.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/graphics/controls.cpp b/engines/sci/graphics/controls.cpp
index f917f8291c..1abb8478a1 100644
--- a/engines/sci/graphics/controls.cpp
+++ b/engines/sci/graphics/controls.cpp
@@ -178,8 +178,10 @@ void GfxControls::kernelTexteditChange(reg_t controlObject, reg_t eventObject) {
}
break;
case SCI_KEY_DELETE:
- text.deleteChar(cursorPos);
- textChanged = true;
+ if (cursorPos < textSize) {
+ text.deleteChar(cursorPos);
+ textChanged = true;
+ }
break;
case SCI_KEY_HOME: // HOME
cursorPos = 0; textChanged = true;