diff --git a/build b/build index 89639dc33..75a84c5a2 100755 --- a/build +++ b/build @@ -1,4 +1,4 @@ -cc -std=c99 \ +cc -std=c99 -funsigned-char \ -Wall -Wno-format-security -Wno-comment -o hush \ -Iinclude -include include/autoconf.h \ -Dhush_main=main -DNDEBUG -D"BB_VER=KBUILD_STR(1.22.1)" -D"KBUILD_STR(s)=#s" \ diff --git a/shell/hush.c b/shell/hush.c index ae23afb54..ad1b8da09 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -5322,7 +5322,7 @@ static NOINLINE int expand_vars_to_list(o_string *output, int n, char *arg) } else /* If EXP_FLAG_SINGLEWORD, we handle assignment 'a=....$@.....' * and in this case should treat it like '$*' - see 'else...' below */ - if ((unsigned char)first_ch == ('@'|0x80) /* quoted $@ */ + if (first_ch == ('@'|0x80) /* quoted $@ */ && !(output->o_expflags & EXP_FLAG_SINGLEWORD) /* not v="$@" case */ ) { while (1) {