diff options
Diffstat (limited to 'lib/string.c')
| -rw-r--r-- | lib/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/string.c b/lib/string.c index d50185536bf3..05dfb7ff5fd9 100644 --- a/lib/string.c +++ b/lib/string.c @@ -89,7 +89,7 @@ char * strncpy(char * dest,const char *src,size_t count) while (count && (*dest++ = *src++) != '\0') count--; - while (count) { + while (count > 1) { *dest++ = 0; count--; } |
