mirror of
https://github.com/RubyMetric/chsrc
synced 2026-10-25 17:36:32 +08:00
Fix bug to make.Reason is goto
This commit is contained in:
1 parent
6152c7f18c
commit
bf75ccb77c
1 file changed
+4
-2
@@ -473,6 +473,8 @@ static char *
|
||||
_xy_str_to_terminal_style (int style, const char *str)
|
||||
{
|
||||
char *color_fmt_str = NULL;
|
||||
size_t len;
|
||||
char *buf;
|
||||
|
||||
if (!xy.enable_color)
|
||||
{
|
||||
@@ -511,8 +513,8 @@ _xy_str_to_terminal_style (int style, const char *str)
|
||||
|
||||
new_str:
|
||||
// -2 把中间%s减掉
|
||||
size_t len = strlen (color_fmt_str) - 2;
|
||||
char *buf = malloc (strlen (str) + len + 1);
|
||||
len = strlen (color_fmt_str) - 2;
|
||||
buf = malloc (strlen (str) + len + 1);
|
||||
sprintf (buf, color_fmt_str, str);
|
||||
return buf;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user