Skip to content

Commit

Permalink
Fixed crash when snprintf failed in formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Nov 22, 2020
1 parent 2ab2f5e commit c977bae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 "";
Expand Down

0 comments on commit c977bae

Please sign in to comment.