diff options
Diffstat (limited to 'src/parser.cpp')
-rw-r--r-- | src/parser.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 1942281..b6ecc0f 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -1455,7 +1455,11 @@ StateStart::custom(gchar chr) BEGIN_EXEC(this); v = interface.ssm(SCI_GETCURRENTPOS) + expressions.pop_num_calc(); - if (!Validate::pos(v)) + /* + * NOTE: We cannot use Validate::pos() here since + * the end of the buffer is not a valid position for <A>. + */ + if (v < 0 || v >= interface.ssm(SCI_GETLENGTH)) throw RangeError("A"); expressions.push(interface.ssm(SCI_GETCHARAT, v)); break; |