wchar_t string needed to represent "string", which in our case
is just strlen(string); feedback & "looks right" deraadt@
-/* $OpenBSD: multibyte_sb.c,v 1.6 2005/12/10 02:01:51 deraadt Exp $ */
+/* $OpenBSD: multibyte_sb.c,v 1.7 2008/08/23 07:51:35 djm Exp $ */
/* $NetBSD: multibyte_sb.c,v 1.4 2003/08/07 16:43:04 agc Exp $ */
/*
{
/* pwcs may be NULL */
- /* s may be NULL */
+ if (pwcs == NULL)
+ return strlen(s);
return mbsrtowcs(pwcs, &s, n, NULL);
}