From 641e117723e2ff36d22d1cf73645662ecff1330e Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 11 Apr 2009 12:34:14 +0000 Subject: [PATCH] fix load alloc bug. SVN revision: 39980 --- src/lib/elc_notepad.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/elc_notepad.c b/src/lib/elc_notepad.c index 0a22ceb..4bf3b2a 100644 --- a/src/lib/elc_notepad.c +++ b/src/lib/elc_notepad.c @@ -53,14 +53,12 @@ _on_focus_hook(void *data, Evas_Object *obj) static char * _buf_append(char *buf, const char *str, int *len, int *alloc) { - int len2; - - len2 = strlen(str); + int len2 = strlen(str); if ((*len + len2) >= *alloc) { char *buf2; - buf2 = realloc(buf, *alloc + 512); + buf2 = realloc(buf, *alloc + len2 + 512); if (!buf2) return NULL; buf = buf2; *alloc += 512; -- 2.7.4