From 237358be932e819532f5085269497958ad2f6aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Br=C3=BCschweiler?= Date: Tue, 2 Oct 2012 11:06:51 +0200 Subject: [PATCH] editor: fix assert to take preedit string into account --- clients/editor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clients/editor.c b/clients/editor.c index 4003e19e..6b67dd3c 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -500,7 +500,8 @@ text_entry_update_layout(struct text_entry *entry) { char *text; - assert(((unsigned int)entry->cursor) <= strlen(entry->text)); + assert(((unsigned int)entry->cursor) <= strlen(entry->text) + + (entry->preedit_text ? strlen(entry->preedit_text) : 0)); if (!entry->preedit_text) { text_layout_set_text(entry->layout, entry->text);