BColumnListView: BSizeColumn sort with big files works as expected

- Use off_t to compute the difference
- Fixes #14279

Change-Id: I253f16bb75501904ff59ac603a4680c66cfec33f
This commit is contained in:
Janus 2018-07-15 09:24:46 +02:00 committed by waddlesplash
parent 27dcc63210
commit 70f1070b6f

View File

@ -474,7 +474,12 @@ BSizeColumn::DrawField(BField* _field, BRect rect, BView* parent)
int
BSizeColumn::CompareFields(BField* field1, BField* field2)
{
return ((BSizeField*)field1)->Size() - ((BSizeField*)field2)->Size();
off_t diff = ((BSizeField*)field1)->Size() - ((BSizeField*)field2)->Size();
if (diff > 0)
return 1;
if (diff < 0)
return -1;
return 0;
}