From 9a816cc9d861a4c43c0781b72b55aad4b816576f Mon Sep 17 00:00:00 2001 From: Jerem584 <31523935+Jerem584@users.noreply.github.com> Date: Sun, 25 Dec 2022 17:40:11 +0100 Subject: [PATCH] Bypass windows.h min/max macro --- zip_file.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zip_file.hpp b/zip_file.hpp index c324f70..feafb62 100644 --- a/zip_file.hpp +++ b/zip_file.hpp @@ -5621,7 +5621,7 @@ class zip_file { if(!comment.empty()) { - auto comment_length = std::min(static_cast(comment.length()), std::numeric_limits::max()); + auto comment_length = (std::min)(static_cast(comment.length()), (std::numeric_limits::max)()); buffer_[buffer_.size() - 2] = static_cast(comment_length); buffer_[buffer_.size() - 1] = static_cast(comment_length >> 8); std::copy(comment.begin(), comment.end(), std::back_inserter(buffer_));