about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--posix/regex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/posix/regex.c b/posix/regex.c
index b4adfcf6ed..bff88c5412 100644
--- a/posix/regex.c
+++ b/posix/regex.c
@@ -3531,11 +3531,11 @@ compile_range (range_start_char, p_ptr, pend, translate, syntax, b)
   collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
 						 _NL_COLLATE_COLLSEQMB);
 
-  start_colseq = collseq[TRANSLATE (range_start_char)];
-  end_colseq = collseq[TRANSLATE (p[0])];
+  start_colseq = collseq[(unsigned char) TRANSLATE (range_start_char)];
+  end_colseq = collseq[(unsigned char) TRANSLATE (p[0])];
   for (this_char = 0; this_char <= (unsigned char) -1; ++this_char)
     {
-      unsigned int this_colseq = collseq[TRANSLATE (this_char)];
+      unsigned int this_colseq = collseq[(unsigned char) TRANSLATE (this_char)];
 
       if (start_colseq <= this_colseq && this_colseq <= end_colseq)
 	{