aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/RESearch.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RESearch.cxx b/src/RESearch.cxx
index a5dbf3678..3baa37c91 100644
--- a/src/RESearch.cxx
+++ b/src/RESearch.cxx
@@ -522,7 +522,7 @@ const char *RESearch::Compile(const char *pattern, int length, bool caseSensitiv
if (*(p+1) != ']') {
c1 = prevChar + 1;
i++;
- c2 = *++p;
+ c2 = static_cast<unsigned char>(*++p);
if (c2 == '\\') {
if (!*(p+1)) // End of RE
return badpat("Missing ]");
@@ -577,7 +577,7 @@ const char *RESearch::Compile(const char *pattern, int length, bool caseSensitiv
prevChar = -1;
}
} else {
- prevChar = *p;
+ prevChar = static_cast<unsigned char>(*p);
ChSetWithCase(*p, caseSensitive);
}
i++;