mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
Don't write more nul bytes than necessary
svn path=/trunk/; revision=7891
This commit is contained in:
parent
01723ab7ca
commit
c778f1be56
2 changed files with 2 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: tcsncpy.h,v 1.1 2003/07/06 23:04:19 hyperion Exp $
|
||||
/* $Id: tcsncpy.h,v 1.2 2004/01/27 21:43:47 gvg Exp $
|
||||
*/
|
||||
|
||||
#include "tchar.h"
|
||||
|
@ -22,7 +22,6 @@ _tcsncpy:
|
|||
_tstos
|
||||
test %_treg(a), %_treg(a)
|
||||
jnz .L1
|
||||
rep _tstos
|
||||
|
||||
.L2:
|
||||
mov 0x0C(%esp), %eax
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: tcsncpy.h,v 1.1 2003/07/06 23:04:19 hyperion Exp $
|
||||
/* $Id: tcsncpy.h,v 1.2 2004/01/27 21:43:47 gvg Exp $
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
@ -15,7 +15,6 @@ _TCHAR * _tcsncpy(_TCHAR * dst, const _TCHAR * src, size_t n)
|
|||
{
|
||||
if((*d ++ = *s ++) == 0)
|
||||
{
|
||||
while (-- n != 0) *d ++ = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue