aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-03-30 23:03:29 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-04-01 13:04:11 +0200
commit78ee8fc3e457452a6cdd25802b85f45b064bb845 (patch)
tree22f3e3f7be290e9f94880305c08104b33313e89b
parent08cbe510dd779106c03e0699dac9c8d0347cec6b (diff)
downloadbusybox-w32-78ee8fc3e457452a6cdd25802b85f45b064bb845.tar.gz
busybox-w32-78ee8fc3e457452a6cdd25802b85f45b064bb845.tar.bz2
busybox-w32-78ee8fc3e457452a6cdd25802b85f45b064bb845.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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 699b6c0ee..881af034d 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -7318,13 +7318,13 @@ hasmeta(const char *p)
7318 p = strpbrk(p, chars); 7318 p = strpbrk(p, chars);
7319 if (!p) 7319 if (!p)
7320 break; 7320 break;
7321 switch ((unsigned char) *p) { 7321 switch ((unsigned char)*p) {
7322 case CTLQUOTEMARK: 7322 case CTLQUOTEMARK:
7323 for (;;) { 7323 for (;;) {
7324 p++; 7324 p++;
7325 if (*p == CTLQUOTEMARK) 7325 if ((unsigned char)*p == CTLQUOTEMARK)
7326 break; 7326 break;
7327 if (*p == CTLESC) 7327 if ((unsigned char)*p == CTLESC)
7328 p++; 7328 p++;
7329 if (*p == '\0') /* huh? */ 7329 if (*p == '\0') /* huh? */
7330 return 0; 7330 return 0;