Fixed crash when snprintf failed in formatter
This commit is contained in:
parent
2ab2f5e675
commit
c977baecc4
@ -21,7 +21,7 @@ namespace hex {
|
||||
|
||||
template<typename ... Args>
|
||||
inline std::string format(const std::string &format, Args ... args) {
|
||||
size_t size = snprintf( nullptr, 0, format.c_str(), args ... );
|
||||
ssize_t size = snprintf( nullptr, 0, format.c_str(), args ... );
|
||||
|
||||
if( size <= 0 )
|
||||
return "";
|
||||
|
Loading…
Reference in New Issue
Block a user