diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Document.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 6614a7fc9..de06756a5 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -334,6 +334,8 @@ void Document::ModifiedAt(int pos) { // Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number void Document::DeleteChars(int pos, int len) { + if ((pos + len) > Length()) + return; if (cb.IsReadOnly() && enteredReadOnlyCount==0) { enteredReadOnlyCount++; NotifyModifyAttempt(); |