/\/\ \-/ ❭❬ 6 years ago
parent
commit
df930ffb5a
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/ttail_init.c

+ 1
- 1
src/ttail_init.c View File

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

Loading…
Cancel
Save