don't use strlen() to verify the length of the string as it can contain embedded NULs (patch 1643843; closes bug 1642284)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-02-11 02:22:09 +00:00
parent 3c77aabe59
commit 13ab552e4d

View File

@ -1199,7 +1199,11 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
return lenMax+1; // not enough space in the output buffer !
}
wxASSERT(lenCur == wxStrlen(buf));
// Don't do:
// wxASSERT(lenCur == wxStrlen(buf));
// in fact if we embedded NULLs in the output buffer (using %c with a '\0')
// such check would fail
return lenCur;
}