diff --git a/cwText.cpp b/cwText.cpp index 97feddd..fc305f1 100644 --- a/cwText.cpp +++ b/cwText.cpp @@ -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[]