Changeset 298 for trunk/dll/literal.c


Ignore:
Timestamp:
Jun 27, 2006, 2:17:58 AM (19 years ago)
Author:
root
Message:

liternal: comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/literal.c

    r117 r298  
    88
    99  Copyright (c) 1993-98 M. Kimes
    10   Copyright (c) 2004 Steven H.Levine
     10  Copyright (c) 2004, 2006 Steven H.Levine
    1111
    1212  Archive containers
    1313
    14   Revisions     01 Aug 04 SHL - Rework fixup to avoid overflows
     14  01 Aug 04 SHL Rework fixup to avoid overflows
     15  16 Jun 06 SHL liternal: comments
    1516
    1617***********************************************************************/
     
    6667 *
    6768 *    ( s now equals "this is a test of \MSC\CSM")
     69 *
     70 * Return converted character count
     71 * Does not include terminating nul
    6872 */
    6973
     
    176180   iBuf++;
    177181  } // while
    178   *pszOut = 0;  /* terminate the string */
    179 
    180   cBufBytes = pszOut - pszWork;         /* Calc string length */
     182  *pszOut = 0;                          /* Always terminate, even if not string */
     183
     184  cBufBytes = pszOut - pszWork;         /* Calc string length excluding terminator */
    181185  memcpy(pszBuf,pszWork,cBufBytes + 1); /* Overwrite including terminator */
    182186  free(pszWork);
    183187
    184   return cBufBytes;                     /* return string length */
     188  return cBufBytes;                     /* Return string length */
    185189}
    186190
Note: See TracChangeset for help on using the changeset viewer.