diff --git a/include/spdlog/details/file_helper.h b/include/spdlog/details/file_helper.h index c9a70ef7..a5f9f265 100644 --- a/include/spdlog/details/file_helper.h +++ b/include/spdlog/details/file_helper.h @@ -66,7 +66,7 @@ public: { close(); - tchar* mode = truncate ? S("wb") : S("ab"); + const tchar* mode = truncate ? S("wb") : S("ab"); _filename = fname; for (int tries = 0; tries < open_tries; ++tries) {