diff --git a/src/json.hpp b/src/json.hpp index c10c4037d..cb52a6ef1 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -10323,7 +10323,7 @@ class basic_json // refill is.read(reinterpret_cast(buffer.data()), static_cast(buffer.size())); // set unfilled characters to EOF - std::fill_n(buffer.begin() + is.gcount(), + std::fill_n(buffer.begin() + static_cast(is.gcount()), buffer.size() - static_cast(is.gcount()), std::char_traits::eof()); // the buffer is ready