We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e26292 commit f10a49dCopy full SHA for f10a49d
lib/xy.h
@@ -510,11 +510,10 @@ _xy_str_to_terminal_style (int style, const char *str)
510
511
// 标签后第一句必须为statement,否则会编译不通过
512
size_t len;
513
- char *buf;
514
new_str:
515
// -2 把中间%s减掉
516
len = strlen (color_fmt_str) - 2;
517
- buf = malloc (strlen (str) + len + 1);
+ char *buf = malloc (strlen (str) + len + 1);
518
sprintf (buf, color_fmt_str, str);
519
return buf;
520
}
0 commit comments