1
0
mirror of synced 2024-11-28 17:40:51 +01:00

Fixed crash when snprintf failed in formatter

This commit is contained in:
WerWolv 2020-11-23 00:35:26 +01:00
parent 2ab2f5e675
commit c977baecc4

View File

@ -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 "";