From 1ec3f128051ce52ff937ae0d7c89b3ecb17c6993 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 17 Jul 2012 08:54:33 +0000 Subject: [PATCH] use int(0) not Eina_Bool(0) to terminate a string, also we don't actually have to do all this freeing and reallocating SVN revision: 73961 --- src/bin/e_fm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index d6da0d16d..179ac65ac 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -5627,7 +5627,6 @@ static void _e_fm2_typebuf_char_backspace(Evas_Object *obj) { E_Fm2_Smart_Data *sd; - char *ts; int len, p, dec; sd = evas_object_smart_data_get(obj); @@ -5640,11 +5639,8 @@ _e_fm2_typebuf_char_backspace(Evas_Object *obj) return; } p = evas_string_char_prev_get(sd->typebuf.buf, len, &dec); - if (p >= 0) sd->typebuf.buf[p] = EINA_FALSE; - ts = strdup(sd->typebuf.buf); - if (!ts) return; - free(sd->typebuf.buf); - sd->typebuf.buf = ts; + if (p < 0) return; + sd->typebuf.buf[p] = 0; _e_fm2_typebuf_match(obj, 0); edje_object_part_text_set(sd->overlay, "e.text.typebuf_label", sd->typebuf.buf); evas_object_smart_callback_call(sd->obj, "typebuf_changed", sd->typebuf.buf);