fix off-by-one error in append_ll()
[lttv.git] / 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.042405 seconds and 4 git commands to generate.