mirror of https://github.com/WerWolv/ImHex.git
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>
|
template<typename ... Args>
|
||||||
inline std::string format(const std::string &format, Args ... 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 )
|
if( size <= 0 )
|
||||||
return "";
|
return "";
|
||||||
|
|
Loading…
Reference in New Issue