aboutsummaryrefslogtreecommitdiff
path: root/src/ui.cc
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-10-03 17:28:15 +0200
committerjcid <devnull@localhost>2008-10-03 17:28:15 +0200
commit56ef7c5137ea3dfd32303d32aaf1ec361234f15d (patch)
tree109e42c7a0a6b8b781cd9df730c1ba35988ad83e /src/ui.cc
parent5a67c8be446fd68f5aeb34a1a132b8d8a6771499 (diff)
- Avoid a valgrind detexcted illegal memory access.
Diffstat (limited to 'src/ui.cc')
-rw-r--r--src/ui.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui.cc b/src/ui.cc
index 378fa335..f87eb066 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -821,8 +821,9 @@ const char *UI::get_location()
*/
void UI::set_location(const char *str)
{
- Location->static_value("");
- Location->insert(str);
+ if (!str) str = "";
+ Location->text(str);
+ Location->position(strlen(str));
}
/*