[PATCH 1/4] editor: fix assert to take preedit string into account

Kristian Høgsberg hoegsberg at gmail.com
Thu Oct 4 08:33:55 PDT 2012


On Tue, Oct 02, 2012 at 11:06:51AM +0200, Philipp Brüschweiler wrote:

Thanks, all four fixes applied.

Kristian

> ---
>  clients/editor.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/clients/editor.c b/clients/editor.c
> index 5643338..c656b06 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);
> -- 
> 1.7.12.2
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list