aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2011-06-12 12:54:52 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2011-06-12 12:54:52 +0000
commitf5ac5937d30f76f907bb5cdcc8d24fa0a4b94c52 (patch)
tree6c049c7d16d4193f9e4244a8b67b76cde12e52db /bin
parent69a6d1985d135502e9a5565626191a0298b59a25 (diff)
Notes
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/expand.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index aaa91acc3392..beb655d0c646 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -1430,7 +1430,7 @@ patmatch(const char *pattern, const char *string, int squoted)
if (localeisutf8)
wc = get_wc(&q);
else
- wc = *q++;
+ wc = (unsigned char)*q++;
if (wc == '\0')
return 0;
break;
@@ -1487,7 +1487,7 @@ patmatch(const char *pattern, const char *string, int squoted)
if (localeisutf8)
chr = get_wc(&q);
else
- chr = *q++;
+ chr = (unsigned char)*q++;
if (chr == '\0')
return 0;
c = *p++;
@@ -1502,7 +1502,7 @@ patmatch(const char *pattern, const char *string, int squoted)
if (wc == 0) /* bad utf-8 */
return 0;
} else
- wc = c;
+ wc = (unsigned char)c;
if (*p == '-' && p[1] != ']') {
p++;
while (*p == CTLQUOTEMARK)
@@ -1514,7 +1514,7 @@ patmatch(const char *pattern, const char *string, int squoted)
if (wc2 == 0) /* bad utf-8 */
return 0;
} else
- wc2 = *p++;
+ wc2 = (unsigned char)*p++;
if ( collate_range_cmp(chr, wc) >= 0
&& collate_range_cmp(chr, wc2) <= 0
)