From f6e3111c8215f9afcb21d9cbe2d0bbb7b7dbba3b Mon Sep 17 00:00:00 2001 From: pmf Date: Sat, 28 Jul 2007 05:05:01 +0000 Subject: [PATCH] fix off-by-one error in append_ll() git-svn-id: http://ltt.polymtl.ca/svn@2554 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/facility.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ltt/branches/poly/ltt/facility.c b/ltt/branches/poly/ltt/facility.c index 65c86893..e0c296a5 100644 --- a/ltt/branches/poly/ltt/facility.c +++ b/ltt/branches/poly/ltt/facility.c @@ -234,8 +234,8 @@ void append_ll (char **fmt, char **fmt_type){ int num; - //new_fmt = malloc(strlen(*fmt)*sizeof(char)+2);//the +2 corresponds the the "ll"; - new_fmt = g_new(gchar, strlen(*fmt)+2); + //the +2 corresponds the the "ll"; the +1 is the \0 + new_fmt = g_new(gchar, strlen(*fmt)+2+1); num = *fmt_type - *fmt; -- 2.34.1