From 4f440055cbc69615e38591089e148d3cc17784e1 Mon Sep 17 00:00:00 2001 From: Totoo Date: Sat, 2 Dec 2023 23:42:09 +0100 Subject: [PATCH] Fix to_string_hex_array string reserve (#1619) --- firmware/application/string_format.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/application/string_format.cpp b/firmware/application/string_format.cpp index 9b6c6cf9..8a88f9b3 100644 --- a/firmware/application/string_format.cpp +++ b/firmware/application/string_format.cpp @@ -253,7 +253,7 @@ std::string to_string_hex(uint64_t value, int32_t length) { std::string to_string_hex_array(uint8_t* array, int32_t length) { std::string str_return; - str_return.reserve(length); + str_return.reserve(length * 2); for (uint8_t i = 0; i < length; i++) str_return += to_string_hex(array[i], 2);