Skip to content

Commit

Permalink
Fix #289: Fixed build problem with Visual C++
Browse files Browse the repository at this point in the history
  • Loading branch information
yhirose committed Dec 13, 2019
1 parent 72b20c0 commit d2c7b44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned char> 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) {
Expand Down

0 comments on commit d2c7b44

Please sign in to comment.