aboutsummaryrefslogtreecommitdiff
path: root/pattern.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-05-20 15:41:42 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-05-20 15:41:42 -0700
commit0a1493dffab840260619e41790211e2222e8170a (patch)
treef84ca8cfc86418adfa665c33c5394850dc1c797b /pattern.c
parent9577e0dd8a135094da0ccf255ed1c702ade14b50 (diff)
Cleanup/fix
Diffstat (limited to 'pattern.c')
-rw-r--r--pattern.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pattern.c b/pattern.c
index 72e8c19..4e55928 100644
--- a/pattern.c
+++ b/pattern.c
@@ -286,10 +286,9 @@ static pat_t *_bp_simplepattern(file_t *f, const char *str)
const char *opstart = str;
unsigned char e = (unsigned char)unescapechar(str, &str);
- if (*str == '-') { // Escape range (e.g. \x00-\xFF)
+ if (matchchar(&str, '-')) { // Escape range (e.g. \x00-\xFF)
if (next_char(f, str) != str+1)
file_err(f, start, next_char(f, str), "Sorry, UTF8 escape sequences are not supported.");
- str = next_char(f, str);
const char *seqstart = str;
unsigned char e2 = (unsigned char)unescapechar(str, &str);
if (str == seqstart)