From d2c7b447d514b153e84f64db5a17557b51dbd942 Mon Sep 17 00:00:00 2001 From: yhirose Date: Fri, 13 Dec 2019 09:12:50 -0500 Subject: [PATCH] Fix #289: Fixed build problem with Visual C++ --- httplib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/httplib.h b/httplib.h index 6ef91b5..55ef341 100644 --- a/httplib.h +++ b/httplib.h @@ -2285,11 +2285,11 @@ inline std::string message_digest(const std::string &s, Init init, size_t digest_length) { using namespace std; - unsigned char md[digest_length]; + std::vector md(digest_length, 0); CTX ctx; init(&ctx); update(&ctx, s.data(), s.size()); - final(md, &ctx); + final(md.data(), &ctx); stringstream ss; for (auto c : md) {