]> git.wh0rd.org Git - nano.git/commitdiff
n is ignored in the mbstowcs() call, so it can be 0 instead of
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 18 Jun 2005 05:15:08 +0000 (05:15 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 18 Jun 2005 05:15:08 +0000 (05:15 +0000)
(size_t)-1

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2721 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/chars.c

index 0f76079e4231c0bb375db262980a4baa98dd96d4..c9b0356c5d18af2871ad492fb3cab318c1233245 100644 (file)
@@ -858,7 +858,7 @@ bool is_valid_mbstring(const char *s)
     return 
 #ifdef NANO_WIDE
        ISSET(USE_UTF8) ?
-       (mbstowcs(NULL, s, (size_t)-1) != (size_t)-1) :
+       (mbstowcs(NULL, s, 0) != (size_t)-1) :
 #endif
 
        TRUE;