Get size of pointer from array, not fixed type name
parent
077ca3236e
commit
9da72fc4cc
|
@ -106,7 +106,7 @@ char* format_byte_humanreadable(char* string, int stringsize, double number, int
|
|||
}
|
||||
|
||||
/* calculate number and appropriate unit size for display */
|
||||
while(number_displayed >= thousand_divider && uidx < (sizeof(unit_names) / sizeof(char*) - 1))
|
||||
while(number_displayed >= thousand_divider && uidx < (sizeof(unit_names) / sizeof(unit_names[0]) - 1))
|
||||
{
|
||||
number_displayed /= thousand_divider;
|
||||
uidx++;
|
||||
|
|
Loading…
Reference in New Issue