From 20d6aecde9782542b82726864fcb01f01ff38dff Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Thu, 11 Sep 2008 00:32:37 +0200 Subject: [PATCH] Fix m_strncpy() speed issue. Signed-off-by: Florent Bruneau --- common/str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/str.c b/common/str.c index 99a5be5..c3cfbd4 100644 --- a/common/str.c +++ b/common/str.c @@ -132,7 +132,7 @@ ssize_t m_strcpy(char *dst, ssize_t n, const char *src) */ ssize_t m_strncpy(char *dst, ssize_t n, const char *src, ssize_t l) { - ssize_t len = MIN(m_strlen(src), l); + ssize_t len = m_strnlen(src, l); if (n > 0) { ssize_t dlen = MIN(n - 1, len); -- 2.20.1