aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/ui
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/ui')
-rw-r--r--engines/wintermute/ui/ui_edit.cpp4
-rw-r--r--engines/wintermute/ui/ui_edit.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/wintermute/ui/ui_edit.cpp b/engines/wintermute/ui/ui_edit.cpp
index 23c783d200..a82a12258f 100644
--- a/engines/wintermute/ui/ui_edit.cpp
+++ b/engines/wintermute/ui/ui_edit.cpp
@@ -853,7 +853,7 @@ bool UIEdit::handleKeypress(Common::Event *event, bool printable) {
//WideString wstr = StringUtil::Utf8ToWide(event->kbd.ascii);
WideString wstr;
wstr += (char)event->kbd.ascii;
- _selEnd += insertChars(_selEnd, (byte *)StringUtil::wideToAnsi(wstr).c_str(), 1);
+ _selEnd += insertChars(_selEnd, (const byte *)StringUtil::wideToAnsi(wstr).c_str(), 1);
if (_gameRef->_textRTL) {
_selEnd = _selStart;
@@ -897,7 +897,7 @@ int UIEdit::deleteChars(int start, int end) {
//////////////////////////////////////////////////////////////////////////
-int UIEdit::insertChars(int pos, byte *chars, int num) {
+int UIEdit::insertChars(int pos, const byte *chars, int num) {
if ((int)strlen(_text) + num > _maxLength) {
num -= (strlen(_text) + num - _maxLength);
}
diff --git a/engines/wintermute/ui/ui_edit.h b/engines/wintermute/ui/ui_edit.h
index ea943e3d57..fa760951b0 100644
--- a/engines/wintermute/ui/ui_edit.h
+++ b/engines/wintermute/ui/ui_edit.h
@@ -39,7 +39,7 @@ class UIEdit : public UIObject {
public:
DECLARE_PERSISTENT(UIEdit, UIObject)
int _maxLength;
- int insertChars(int pos, byte *chars, int num);
+ int insertChars(int pos, const byte *chars, int num);
int deleteChars(int start, int end);
bool _cursorVisible;
uint32 _lastBlinkTime;