n is ignored in the mbstowcs() call, so it can be 0 instead of

(size_t)-1


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2721 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-06-18 05:15:08 +00:00
parent 62898233ac
commit 7098ec233c
1 changed files with 1 additions and 1 deletions

View File

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