diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c index d859a13bd..72d199760 100644 --- a/grub-core/script/execute.c +++ b/grub-core/script/execute.c @@ -374,7 +374,7 @@ grub_script_arglist_to_argv (struct grub_script_arglist *arglist, case GRUB_SCRIPT_ARG_TYPE_DQSTR: case GRUB_SCRIPT_ARG_TYPE_SQSTR: - if (grub_script_argv_append (&result, arg->str)) + if (append (arg->str, 1)) goto fail; break; } diff --git a/tests/grub_cmd_echo.in b/tests/grub_cmd_echo.in index 6ac33f55e..902696778 100644 --- a/tests/grub_cmd_echo.in +++ b/tests/grub_cmd_echo.in @@ -31,3 +31,11 @@ echo foo -n echo foo -n -e echo ------- + +if test -n "$grubshell"; then insmod regexp; fi + +echo '*' +echo "*" + +foo="*" +echo "$foo"