From a284aa55a8080da4b5849dfecc461706dc4265fe Mon Sep 17 00:00:00 2001 From: dborth Date: Wed, 27 Oct 2010 22:09:23 +0000 Subject: [PATCH] bugfix --- source/gui/gui_keyboard.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/gui/gui_keyboard.cpp b/source/gui/gui_keyboard.cpp index 491f609..07a6562 100644 --- a/source/gui/gui_keyboard.cpp +++ b/source/gui/gui_keyboard.cpp @@ -290,8 +290,11 @@ void GuiKeyboard::Update(GuiTrigger * t) } else if(keyBack->GetState() == STATE_CLICKED) { - kbtextstr[strlen(kbtextstr)-1] = 0; - kbText->SetText(GetDisplayText(kbtextstr)); + if(strlen(kbtextstr) > 0) + { + kbtextstr[strlen(kbtextstr)-1] = 0; + kbText->SetText(GetDisplayText(kbtextstr)); + } keyBack->SetState(STATE_SELECTED, t->chan); } else if(keyShift->GetState() == STATE_CLICKED)