Ignore:
Timestamp:
Jun 23, 2001, 11:12:49 AM (24 years ago)
Author:
umoeller
Message:

Tons of changes from the last weeks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/stringh.c

    r73 r81  
    16421642 *      Note: On the first call, *ppszRoot and *pcbRoot
    16431643 *      _must_ be both NULL, or this crashes.
     1644 *
     1645 *@@changed V0.9.13 (2001-06-21) [umoeller]: added cbNew
    16441646 */
    16451647
    16461648VOID strhArrayAppend(PSZ *ppszRoot,         // in: root of array
    16471649                     const char *pcszNew,   // in: string to append
     1650                     ULONG cbNew,           // in: size of that string or 0 to run strlen() here
    16481651                     PULONG pcbRoot)        // in/out: size of array
    16491652{
    1650     ULONG cbNew = strlen(pcszNew);
    1651     PSZ pszTemp = (PSZ)malloc(*pcbRoot
    1652                               + cbNew
    1653                               + 1);    // two null bytes
     1653    PSZ pszTemp;
     1654
     1655    if (!cbNew)     // V0.9.13 (2001-06-21) [umoeller]
     1656        cbNew = strlen(pcszNew);
     1657
     1658    pszTemp = (PSZ)malloc(*pcbRoot
     1659                          + cbNew
     1660                          + 1);    // two null bytes
    16541661    if (*ppszRoot)
    16551662    {
Note: See TracChangeset for help on using the changeset viewer.