Changeset 857


Ignore:
Timestamp:
Nov 4, 2007, 8:58:30 PM (13 years ago)
Author:
Gregg Young
Message:

Free strdup memory for large file size formatting Add GiB label to CommaFmtULL

Location:
trunk/dll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/commafmt.c

    r793 r857  
    9090                   UINT cBufSize,       // Buffer size, including nul
    9191                   ULONGLONG ullNumber, // Number to convert
    92                    CHAR chPreferred)    // Preferred suffix, blank, K, M
     92                   CHAR chPreferred)    // Preferred suffix, blank, K, M, G
    9393{
    9494  CHAR chSuffix = ' ';
     
    101101      ullNumber = (ullNumber + 1023) >> 10;
    102102      chSuffix = 'M';
     103      if (ullNumber >= 1ULL << 31 || (chPreferred == 'G' && ullNumber >= 1024)) {
     104        ullNumber = (ullNumber + 1023) >> 10;
     105        chSuffix = 'G';
     106      }
    103107    }
    104108  }
  • trunk/dll/filldir.c

    r856 r857  
    15981598    free(psz);
    15991599  }
     1600
     1601  if (pci->pszFmtFileSize && pci->pszFmtFileSize != NullStr) {
     1602    psz = pci->pszFmtFileSize;
     1603    pci->pszFmtFileSize = NullStr;
     1604    free(psz);
     1605  }
    16001606}
    16011607
Note: See TracChangeset for help on using the changeset viewer.