Ticket #6124: aboutsysramreportingfix.patch

File aboutsysramreportingfix.patch, 641 bytes (added by dru_ed, 14 years ago)

fixes the rounding error

  • src/apps/aboutsystem/AboutSystem.cpp

     
    16731673MemUsageToString(char string[], size_t size, system_info* info)
    16741674{
    16751675    snprintf(string, size, B_TRANSLATE("%d MB total, %d MB used (%d%%)"),
    1676             int(info->max_pages / 256.0f + 0.5f),
    1677             int(info->used_pages / 256.0f + 0.5f),
     1676            int(ceil(info->max_pages / 256.0f + 0.5f)),
     1677            int(ceil(info->used_pages / 256.0f + 0.5f)),
    16781678            int(100 * info->used_pages / info->max_pages));
    16791679
    16801680    return string;