Skip to content

Commit

Permalink
Fix %g spec cause zlog conf parse failed (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaxbbun authored Feb 5, 2024
1 parent fbebb73 commit 355ddf9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/spec.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ zlog_spec_t *zlog_spec_new(char *pattern_start, char **pattern_next, int *time_c
p += 3;
} else {
nread = 0;
nscan = sscanf(p, "d(%[^)])%n", a_spec->time_fmt, &nread);
p++;
nscan = sscanf(p, "(%[^)])%n", a_spec->time_fmt, &nread);
if (nscan != 1) {
nread = 0;
}
Expand Down

0 comments on commit 355ddf9

Please # to comment.