diff --git a/ui/hover_help_model.cpp b/ui/hover_help_model.cpp index 1cf5746c3..81d9a1ff8 100644 --- a/ui/hover_help_model.cpp +++ b/ui/hover_help_model.cpp @@ -73,7 +73,7 @@ void HoverHelp::SetCurItem(Item item, ; #define CASE(index, ...) \ case Item::index: \ - cur_string_size = snprintf(NULL, 0, __VA_ARGS__); \ + cur_string_size = snprintf(NULL, 0, __VA_ARGS__) + 1; \ cur_string.resize(cur_string_size); \ snprintf(&cur_string[0], cur_string_size, __VA_ARGS__); \ break;