Fix spdlog crash

Pass a reference to a variable with a wider scope.
This commit is contained in:
Oliver Hamlet
2020-06-14 10:36:43 +01:00
parent 68f0e53d0b
commit 6d1804f2b1
+2 -1
View File
@@ -73,7 +73,8 @@ uint32_t GetCrc32(const std::filesystem::path& filename) {
uint32_t checksum = result.checksum();
if (logger) {
logger->debug("CRC32(\"{}\"): {:x}", filename.u8string(), checksum);
auto u8Filename = filename.u8string();
logger->debug("CRC32(\"{}\"): {:x}", u8Filename, checksum);
}
return checksum;