diff options
| author | Neil <nyamatongwe@gmail.com> | 2026-04-22 09:07:06 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2026-04-22 09:07:06 +1000 |
| commit | 1d3381851bb6d0283055c19052a95eb48c4e4ac2 (patch) | |
| tree | 939bf59a7f2fdc6c5f7752da1fb1a083d29a06ec | |
| parent | 05ed530e941cb65074bc15695574ec08aa89d609 (diff) | |
| download | scintilla-mirror-1d3381851bb6d0283055c19052a95eb48c4e4ac2.tar.gz | |
Assert that string is being inserted inside the document range.
This would be caught in SplitVector::InsertFromArray but this simplifies the
failure and avoids potential for modifications.
| -rw-r--r-- | src/Document.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 8e9c7d8c4..f3dac9aaa 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1485,6 +1485,7 @@ Sci::Position Document::InsertString(Sci::Position position, const char *s, Sci: if (insertLength <= 0) { return 0; } + PLATFORM_ASSERT((position >= 0) && (position <= Length())); CheckReadOnly(); // Application may change read only state here if (cb.IsReadOnly()) { return 0; |
