From c977baecc46ce08a2921c5b620f14106d612a8c7 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 23 Nov 2020 00:35:26 +0100 Subject: [PATCH] Fixed crash when snprintf failed in formatter --- include/utils.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/utils.hpp b/include/utils.hpp index f40f9c3c1..cc826dcd3 100644 --- a/include/utils.hpp +++ b/include/utils.hpp @@ -21,7 +21,7 @@ namespace hex { template 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 "";