diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-12-01 16:53:21 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-12-01 16:53:27 +0100 |
| commit | 96730f80cbc3b2d5aec2967a61f16bb2f02853e6 (patch) | |
| tree | 2efb7ea0cf9f9f71aa7fa1838bd4b349ff9157d2 /src/Fl_Text_Buffer.cxx | |
| parent | ccc21d381a41620a9fb91870ab2a47ef9309d148 (diff) | |
Adds some possible NULL references and small fixes
Diffstat (limited to 'src/Fl_Text_Buffer.cxx')
| -rw-r--r-- | src/Fl_Text_Buffer.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx index caf4b3839..3bb8a10f0 100644 --- a/src/Fl_Text_Buffer.cxx +++ b/src/Fl_Text_Buffer.cxx @@ -1406,11 +1406,11 @@ int Fl_Text_Buffer::insert_(int pos, const char *text, int insertedLength) /* Remove a string from the buffer. Unicode safe. Start and end must be at a character boundary. + Start must be less than end. */ void Fl_Text_Buffer::remove_(int start, int end) { - /* if the gap is not contiguous to the area to remove, move it there */ - + if (start >= end) return; if (mCanUndo) { if (mUndo->undoat == end && mUndo->undocut) { // continue to remove text at the same cursor position |
