cwText.cpp : Assert that v is non-null on call to toText().

This commit is contained in:
kevin 2021-12-27 20:30:08 -05:00
parent 0f4db7e556
commit a94fbf8996

View File

@ -149,6 +149,8 @@ unsigned cw::toText( char* buf, unsigned bufN, double v )
unsigned cw::toText( char* buf, unsigned bufN, const char* v )
{
assert( v != nullptr );
unsigned sn = strlen(v) + 1;
// bufN must be greater than the length of v[]