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_String.cxx | |
| parent | ccc21d381a41620a9fb91870ab2a47ef9309d148 (diff) | |
Adds some possible NULL references and small fixes
Diffstat (limited to 'src/Fl_String.cxx')
| -rw-r--r-- | src/Fl_String.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_String.cxx b/src/Fl_String.cxx index 1252f1202..8fd8e5f51 100644 --- a/src/Fl_String.cxx +++ b/src/Fl_String.cxx @@ -137,7 +137,8 @@ Fl_String &Fl_String::replace_(int at, int n_del, const char *ins, int n_ins) { ::memmove(buffer_+at, ins, n_ins); } size_ = new_size; - buffer_[size_] = 0; + if (buffer_) + buffer_[size_] = 0; return *this; } |
