@@ -353,7 +353,7 @@ int ttail_set_fmt(ttail_t* t, const char* fmt)
{
return -1;
}
- strncpy(t->fmt, fmt, len);
+ strncpy(t->fmt, fmt, len+1);
t->fmt[len] = '\0';
t->flag |= TTAIL_FLAG_FORMAT;
return 0;