diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2025-01-22 21:11:06 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2025-01-22 21:11:06 +0100 |
| commit | 0c2aa40bbc37c7e8b236e6db7c2f07b90f619e16 (patch) | |
| tree | 1d37f5fac748dfddfb98731f8454b7a8b4b18f45 /src | |
| parent | 915ea80f4590280e431fb4ebbec0c6496b9a054e (diff) | |
Fix Fl_Table_Row inconsistencies, final part (#1187)
Adjust internal vector sizes before and after changing the rows() in
the base class to avoid inconsisten sizes.
Note that the crash reported by the OP of PR #1187 was caused by
more than one issue, not only the one fixed here. Thanks for the
original patch to the author, GitHub user 'basiliscos'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Table_Row.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Table_Row.cxx b/src/Fl_Table_Row.cxx index dca5c10b7..6c7e457f9 100644 --- a/src/Fl_Table_Row.cxx +++ b/src/Fl_Table_Row.cxx @@ -203,8 +203,8 @@ void Fl_Table_Row::select_all_rows(int flag) { // Set number of rows void Fl_Table_Row::rows(int val) { - Fl_Table::rows(val); while ( val > (int)_rowselect.size() ) { _rowselect.push_back(0); } // enlarge + Fl_Table::rows(val); while ( val < (int)_rowselect.size() ) { _rowselect.pop_back(); } // shrink } |
