From ba508057b18ebddb1e7a73b60f9b20e2652f3c92 Mon Sep 17 00:00:00 2001 From: Harris Date: Fri, 22 Dec 2023 20:39:06 +0800 Subject: [PATCH] Update example.cpp to fix the vector issue in bin_example (#2963) with std::vector buf(80), 80 elements are put in the vector, which is not the expected behavior. --- example/example.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/example.cpp b/example/example.cpp index aeff6d76..22109463 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -180,7 +180,7 @@ void async_example() { #if !defined SPDLOG_USE_STD_FORMAT || defined(_MSC_VER) #include "spdlog/fmt/bin_to_hex.h" void binary_example() { - std::vector buf(80); + std::vector buf; for (int i = 0; i < 80; i++) { buf.push_back(static_cast(i & 0xff)); }