hush: fix a signedness bug
Testcase: set -- a ""; space=" "; printf "<%s>\n" "$@"$space Before: <a > After: <a> <> It usually does not bite since bbox forces -funsigned-char build. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
73523079a2
commit
6ffaa00338
@ -6126,7 +6126,7 @@ static NOINLINE int expand_vars_to_list(o_string *output, int n, char *arg)
|
|||||||
} else
|
} else
|
||||||
/* If EXP_FLAG_SINGLEWORD, we handle assignment 'a=....$@.....'
|
/* If EXP_FLAG_SINGLEWORD, we handle assignment 'a=....$@.....'
|
||||||
* and in this case should treat it like '$*' - see 'else...' below */
|
* and in this case should treat it like '$*' - see 'else...' below */
|
||||||
if (first_ch == ('@'|0x80) /* quoted $@ */
|
if (first_ch == (char)('@'|0x80) /* quoted $@ */
|
||||||
&& !(output->o_expflags & EXP_FLAG_SINGLEWORD) /* not v="$@" case */
|
&& !(output->o_expflags & EXP_FLAG_SINGLEWORD) /* not v="$@" case */
|
||||||
) {
|
) {
|
||||||
while (1) {
|
while (1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user