diff options
author | Denys Vlasenko | 2018-03-30 23:03:29 +0200 |
---|---|---|
committer | Denys Vlasenko | 2018-04-01 13:04:11 +0200 |
commit | 78ee8fc3e457452a6cdd25802b85f45b064bb845 (patch) | |
tree | 22f3e3f7be290e9f94880305c08104b33313e89b | |
parent | 08cbe510dd779106c03e0699dac9c8d0347cec6b (diff) | |
download | busybox-78ee8fc3e457452a6cdd25802b85f45b064bb845.zip busybox-78ee8fc3e457452a6cdd25802b85f45b064bb845.tar.gz |
ash: fix "char == CTLfoo" comparison signedness bug
It usually does not bite since bbox forces -funsigned-char build.
But for some reason void linux people disabled that.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/ash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index 699b6c0..881af03 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -7318,13 +7318,13 @@ hasmeta(const char *p) p = strpbrk(p, chars); if (!p) break; - switch ((unsigned char) *p) { + switch ((unsigned char)*p) { case CTLQUOTEMARK: for (;;) { p++; - if (*p == CTLQUOTEMARK) + if ((unsigned char)*p == CTLQUOTEMARK) break; - if (*p == CTLESC) + if ((unsigned char)*p == CTLESC) p++; if (*p == '\0') /* huh? */ return 0; |