diff options
Diffstat (limited to 'serialize')
-rw-r--r-- | serialize/json-helper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/serialize/json-helper.cpp b/serialize/json-helper.cpp index eda628de..c3f861a4 100644 --- a/serialize/json-helper.cpp +++ b/serialize/json-helper.cpp @@ -23,7 +23,7 @@ static T open_stream(StringView filename) (void)::strerror_s(buf, std::size(buf), errno); #endif }; - const char* mode_str = mode & std::ios_base::out ? "writing" : "reading"; + const char* mode_str = (mode & std::ios_base::out) == std::ios_base::out ? "writing" : "reading"; (void)get_error_string(errbuf); fm_error("can't open file '%s' for %s: %s", filename.data(), mode_str, errbuf); } |