diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h index c3cdd4a6..86ec47e1 100644 --- a/include/fmt/ostream.h +++ b/include/fmt/ostream.h @@ -84,8 +84,8 @@ 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(); + if (auto* sfbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf*>(rdbuf)) + c_file = sfbuf->file(); else if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_filebuf*>(rdbuf)) c_file = fbuf->file(); else