summary refs log tree commit diff
path: root/src/expand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expand.c')
-rw-r--r--src/expand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expand.c b/src/expand.c
index 7fdc492..c3f1eef 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -119,7 +119,7 @@ STATIC void expbackq(union node *, int, int);
 STATIC const char *subevalvar(char *, char *, int, int, int, int, int);
 STATIC char *evalvar(char *, int);
 STATIC size_t strtodest(const char *, const char *, int);
-STATIC void memtodest(const unsigned char *, size_t, const char *, int);
+STATIC void memtodest(const char *, size_t, const char *, int);
 STATIC ssize_t varvalue(char *, int, int);
 STATIC void recordregion(int, int, int);
 STATIC void removerecordregions(int); 
@@ -882,7 +882,7 @@ end:
  */
 
 STATIC void
-memtodest(const unsigned char *p, size_t len, const char *syntax, int quotes) {
+memtodest(const char *p, size_t len, const char *syntax, int quotes) {
 	char *q;
 
 	if (unlikely(!len))
@@ -891,7 +891,7 @@ memtodest(const unsigned char *p, size_t len, const char *syntax, int quotes) {
 	q = makestrspace(len * 2, expdest);
 
 	do {
-		int c = *p++;
+		int c = (unsigned char)*p++;
 		if (c) {
 			if ((quotes & QUOTES_ESC) &&
 			    (syntax[c] == CCTL || syntax[c] == CBACK))