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-d3aeb78583b8master
parent
62898233ac
commit
7098ec233c
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue