From 39d9ee85d1f7a52a6dafa712e24d27e188f4e2e0 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Mon, 7 Jan 2019 09:20:22 +0100 Subject: [PATCH] fix possible range violation when allowing cursor past EOL --- src/u_synmemo.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/u_synmemo.pas b/src/u_synmemo.pas index caf502cc..d4db5b5c 100644 --- a/src/u_synmemo.pas +++ b/src/u_synmemo.pas @@ -2573,7 +2573,7 @@ begin if right then c := s[p.x] else - c := s[p.x-1]; + c := s[min(p.x-1, s.length)]; if not right then begin if c in w then