2
0
mirror of https://github.com/boostorg/leaf.git synced 2026-02-09 11:12:37 +00:00

sprintf=>snprintf

This commit is contained in:
Emil Dotchevski
2018-11-12 11:11:42 -08:00
parent f0862128f5
commit defbee2149

View File

@@ -96,7 +96,7 @@ namespace boost { namespace leaf {
friend std::ostream & operator<<( std::ostream & os, error const & e )
{
char buf[sizeof(e.id_)*CHAR_BIT/4+1];
int nw = std::sprintf(buf,"%X",e.id_);
int nw = std::snprintf(buf,sizeof(buf),"%X",e.id_);
assert(nw>=0);
assert(nw<sizeof(buf));
os << buf;