- Timestamp:
- Jul 6, 2000, 11:17:02 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/odincrt/string.cpp
r2039 r3802 1 /* $Id: string.cpp,v 1. 1 1999-12-09 10:58:15sandervl Exp $ */1 /* $Id: string.cpp,v 1.2 2000-07-06 21:17:02 sandervl Exp $ */ 2 2 /* 3 3 * Project Odin Software License can be found in LICENSE.TXT … … 15 15 register char *p2 = (char *)src; 16 16 17 length--; // pre-decrement to avoid exceeding buffer length18 // results in better code than (dest > 1)19 20 17 for (;*p2 && length; length--) 21 18 *p1++ = *p2++; 22 19 23 *p1 = 0; //CB: copy arg-1, set end 0 20 if ( length > 0 ) // above loop ended due to nul in src 21 *p1 = 0; 24 22 25 23 return dest;
Note:
See TracChangeset
for help on using the changeset viewer.