From e61b4040eca4a678a63de7f07f66df5cbc3fd867 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Mon, 27 Oct 2014 00:48:59 -0500 Subject: [PATCH] Make char unsigned, as busybox is designed for (and as ORCA/C does) --- build | 2 +- shell/hush.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) {