From 5dc6462368b2c6a0f5b2c6905068b9a3c25006e0 Mon Sep 17 00:00:00 2001 From: Arturo Espinosa Date: Wed, 1 Dec 1999 18:36:50 +0000 Subject: Fix it correctly -miguel svn path=/trunk/; revision=1452 --- widgets/e-table/e-cell-text.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'widgets/e-table') diff --git a/widgets/e-table/e-cell-text.c b/widgets/e-table/e-cell-text.c index e496a50cb4..d9d8a568db 100644 --- a/widgets/e-table/e-cell-text.c +++ b/widgets/e-table/e-cell-text.c @@ -184,15 +184,12 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable, if (edit_display){ CellEdit *edit = text_view->edit; const char *text = gtk_entry_get_text (edit->entry); - GdkWChar *p, *text_wc; - int text_wc_len; + GdkWChar *p, *text_wc = g_new (GdkWChar, strlen (text) + 1); + int text_wc_len = gdk_mbstowcs (text_wc, text, strlen (text)); const int cursor_pos = GTK_EDITABLE (edit->entry)->current_pos; const int left_len = gdk_text_width_wc (text_view->font, text_wc, cursor_pos); - text_wc = g_new (GdkWChar, strlen (text) + 1); - text_wc_len = gdk_mbstowcs (text_wc, text, strlen (text)); text_wc [text_wc_len] = 0; - /* * Paint */ -- cgit