fix off-by-one error in append_ll()
authorpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 28 Jul 2007 05:05:01 +0000 (05:05 +0000)
committerpmf <pmf@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 28 Jul 2007 05:05:01 +0000 (05:05 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2554 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/facility.c

index 65c86893f103b6dd5896daf5381759324f004df0..e0c296a594873638ea6537c4d0643291ad9c4b4a 100644 (file)
@@ -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;
 
This page took 0.025539 seconds and 4 git commands to generate.