From: David Lawrence Ramsey Date: Fri, 14 Jan 2005 04:45:18 +0000 (+0000) Subject: fix the previous fix X-Git-Tag: v1.3.6~141 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=8eb9c029be2991f9db9c7384dce7c139ce0da3a5;p=nano.git fix the previous fix git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2261 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- 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);