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_));