Skip to content
Permalink
Browse files

. 修正 setmenu --string 函数不解析转义符的错误。(issues #222)

  • Loading branch information
yaya
yaya committed Dec 24, 2019
1 parent dc5f13b commit f53d854e809de22b86f267852299baabf43a045d
Showing with 7 additions and 3 deletions.
  1. +7 −3 stage2/builtins.c
@@ -16594,15 +16594,19 @@ setmenu_func(char *arg, int flags)
else
strings[i].start_x = menu_border.menu_box_x + ((menu_border.menu_box_w - num_text_char(arg)) >> 1);
}
parse_string(arg);
p = strings[i].string;
while (*arg && (p - strings[i].string) < 99)
*p++ = *arg++;
*p = 0;
p = strings[i].string;
if (DateTime_enable == i + 1)
{
while(*p++ != '=');
*(p - 1) = 0;
while(*p && *p++ != '=');
if (*(p - 1) == '=')
*(p - 1) = 0;
else
*(p + 1) = 0;
}
num_string++;
arg++;
@@ -16987,7 +16991,7 @@ void DateTime_refresh(void)
min = time >> 16;
sec = time >> 8;
p = (char *)strings[i].string;
if (!*p)
if (!*(p+1))
grub_printf("%04X-%02d-%02X %02d:%02X:%02X", year, month, day, hour, min, sec);
else
{

0 comments on commit f53d854

Please sign in to comment.
You can’t perform that action at this time.