Fix compiler warning (issue #25)

src/Fl_Table_Row.cxx:56:25: warning: argument 2 range
    [18446744071562067969, 18446744073709551615] exceeds maximum
    object size 9223372036854775807 [-Walloc-size-larger-than=]
     arr = (char*)realloc(arr, count * sizeof(char));
                  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes #25
This commit is contained in:
Albrecht Schlosser 2019-04-29 11:36:21 +02:00
parent 738cce154e
commit bb55c9251d

View File

@ -53,7 +53,7 @@ Fl_Table_Row::CharVector::~CharVector() { // DTOR
void Fl_Table_Row::CharVector::size(int count) { void Fl_Table_Row::CharVector::size(int count) {
if (count != _size) { if (count != _size) {
arr = (char*)realloc(arr, count * sizeof(char)); arr = (char*)realloc(arr, (unsigned)count * sizeof(char));
_size = count; _size = count;
} }
} }