Changeset 298 for trunk/dll/literal.c
- Timestamp:
- Jun 27, 2006, 2:17:58 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/dll/literal.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/literal.c
r117 r298 8 8 9 9 Copyright (c) 1993-98 M. Kimes 10 Copyright (c) 2004 Steven H.Levine10 Copyright (c) 2004, 2006 Steven H.Levine 11 11 12 12 Archive containers 13 13 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 15 16 16 17 ***********************************************************************/ … … 66 67 * 67 68 * ( s now equals "this is a test of \MSC\CSM") 69 * 70 * Return converted character count 71 * Does not include terminating nul 68 72 */ 69 73 … … 176 180 iBuf++; 177 181 } // while 178 *pszOut = 0; /* terminate thestring */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 */ 181 185 memcpy(pszBuf,pszWork,cBufBytes + 1); /* Overwrite including terminator */ 182 186 free(pszWork); 183 187 184 return cBufBytes; /* return string length */188 return cBufBytes; /* Return string length */ 185 189 } 186 190
Note:
See TracChangeset
for help on using the changeset viewer.
