From 8eb9c029be2991f9db9c7384dce7c139ce0da3a5 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 14 Jan 2005 04:45:18 +0000 Subject: [PATCH] fix the previous fix git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2261 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/chars.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/chars.c b/src/chars.c index 2977fd83..5834e59b 100644 --- a/src/chars.c +++ b/src/chars.c @@ -159,13 +159,10 @@ size_t mbstrnlen(const char *s, size_t maxlen) , NULL); if (s_mb_len > maxlen) - s_mb_len = maxlen; + break; maxlen -= s_mb_len; n += s_mb_len; - - if (maxlen == 0) - break; } free(s_mb); -- 2.39.5