aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-07-19 20:00:35 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-07-19 20:00:35 -0700
commit8c351922f4543a0883b19f29144a0549142f1c53 (patch)
tree034790c3588bc72f2d4ce6314991b80b2126f757
parentcc84c3d7916640b75ca4dc0785f9b1f417df1664 (diff)
Error reporting bugfix
-rw-r--r--pattern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pattern.c b/pattern.c
index 32b1376..772527d 100644
--- a/pattern.c
+++ b/pattern.c
@@ -307,7 +307,7 @@ 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 == opstart)
- file_err(f, start, str, "This isn't a valid escape sequence.");
+ file_err(f, start, str+1, "This isn't a valid escape sequence.");
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 in ranges.");