Permalink
Browse files

. 替换title字符串变量中的换行符。(issues #182)

  • Loading branch information...
yaya
yaya committed Sep 19, 2018
1 parent f4759eb commit befeceefb29e86a2e1608a184bec42cbc33408e8
Showing with 21 additions and 0 deletions.
  1. +3 −0 ChangeLog_chenall.txt
  2. +18 −0 stage2/cmdline.c
View
@@ -1,4 +1,7 @@
更新说明:
2018-9-19(yaya)
替换title字符串变量中的换行符。
2018-8-21(yaya)
增加 setmenu --auto-num-all-on 参数。
给所有标题编号。(--auto-num-on 参数仅给引导标题编号)
View
@@ -261,6 +261,24 @@ int expand_var(const char *str,char *out,const unsigned int len_max)
str += i;
}
*out = '\0';
if (len_max == 0x400)
{
char *q0 = out_start;
char *q1 = out_start;
while (*q0)
{
if (*q0 == '\\' && *(q0+1) == 'n')
{
*q1++ = '\n';
q0 += 2;
}
else
*q1++=*q0++;
}
*q1 = '\0';
out = q1;
}
return out - out_start;
}
static int run_cmd_line (char *heap,int flags);

0 comments on commit befecee

Please sign in to comment.