diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-03-30 23:03:29 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-03-30 23:04:39 +0200 |
commit | ac61f447040479f7a852ae2c1262915274496f49 (patch) | |
tree | c0b8705fd1e2f185f5aea0bd1f611d4b277f867d | |
parent | 60fb98e51d11ed45bbc836eb28a2539ba3ab76f7 (diff) | |
download | busybox-w32-ac61f447040479f7a852ae2c1262915274496f49.tar.gz busybox-w32-ac61f447040479f7a852ae2c1262915274496f49.tar.bz2 busybox-w32-ac61f447040479f7a852ae2c1262915274496f49.zip |
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 c957b001e..8fb32c1ae 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -7439,13 +7439,13 @@ hasmeta(const char *p) | |||
7439 | p = strpbrk(p, chars); | 7439 | p = strpbrk(p, chars); |
7440 | if (!p) | 7440 | if (!p) |
7441 | break; | 7441 | break; |
7442 | switch ((unsigned char) *p) { | 7442 | switch ((unsigned char)*p) { |
7443 | case CTLQUOTEMARK: | 7443 | case CTLQUOTEMARK: |
7444 | for (;;) { | 7444 | for (;;) { |
7445 | p++; | 7445 | p++; |
7446 | if (*p == CTLQUOTEMARK) | 7446 | if ((unsigned char)*p == CTLQUOTEMARK) |
7447 | break; | 7447 | break; |
7448 | if (*p == CTLESC) | 7448 | if ((unsigned char)*p == CTLESC) |
7449 | p++; | 7449 | p++; |
7450 | if (*p == '\0') /* huh? */ | 7450 | if (*p == '\0') /* huh? */ |
7451 | return 0; | 7451 | return 0; |