diff --git a/src/chars.c b/src/chars.c index 0f76079e..c9b0356c 100644 --- a/src/chars.c +++ b/src/chars.c @@ -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;