make stream_catString work with null ptr

This commit is contained in:
Eric House 2012-11-01 21:08:58 -07:00
parent ecd6d81228
commit e66ddc3765

View file

@ -248,8 +248,10 @@ mem_stream_putBytes( XWStreamCtxt* p_sctx, const void* whence,
static void static void
mem_stream_catString( XWStreamCtxt* p_sctx, const char* whence ) mem_stream_catString( XWStreamCtxt* p_sctx, const char* whence )
{ {
XP_U16 len = XP_STRLEN( whence ); if ( !!whence ) {
mem_stream_putBytes( p_sctx, (void*)whence, len ); XP_U16 len = XP_STRLEN( whence );
mem_stream_putBytes( p_sctx, (void*)whence, len );
}
} }
static void static void