diff --git a/thirdparty/fmt/include/fmt/ostream.h b/thirdparty/fmt/include/fmt/ostream.h index c3cdd4a61b..2631645b2f 100644 --- a/thirdparty/fmt/include/fmt/ostream.h +++ b/thirdparty/fmt/include/fmt/ostream.h @@ -84,10 +84,10 @@ inline bool write_ostream_unicode(std::ostream& os, fmt::string_view data) { #elif defined(_WIN32) && defined(__GLIBCXX__) auto* rdbuf = os.rdbuf(); FILE* c_file; - if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf*>(rdbuf)) - c_file = fbuf->file(); - else if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_filebuf*>(rdbuf)) - c_file = fbuf->file(); + if (auto* fbuf_sy = dynamic_cast<__gnu_cxx::stdio_sync_filebuf*>(rdbuf)) + c_file = fbuf_sy->file(); + else if (auto* fbuf_as = dynamic_cast<__gnu_cxx::stdio_filebuf*>(rdbuf)) + c_file = fbuf_as->file(); else return false; if (c_file) return write_console(c_file, data);