diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/util/hex.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/hex.h b/src/util/hex.h index df22539a5..31bcaa2ba 100644 --- a/src/util/hex.h +++ b/src/util/hex.h @@ -26,6 +26,8 @@ static const char hex_chars[] = "0123456789abcdef"; static inline std::string hex_encode(const char *data, unsigned int data_size) { std::string ret; + ret.reserve(data_size * 2); + char buf2[3]; buf2[2] = '\0'; |