From da2d21f5b0f5a3a5df1f44601e59fe1f3695fd10 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Thu, 14 Dec 2023 19:35:35 +0000 Subject: [PATCH] Fix: Left-over printf-style format passed to fmt. (#11584) --- src/console_cmds.cpp | 2 +- src/map.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 60f9e6100f..9a1bf76590 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -2272,7 +2272,7 @@ DEF_CONSOLE_CMD(ConNewGRFProfile) started++; if (!grfids.empty()) grfids += ", "; - fmt::format_to(std::back_inserter(grfids), "[{%:08X}]", BSWAP32(pr.grffile->grfid)); + fmt::format_to(std::back_inserter(grfids), "[{:08X}]", BSWAP32(pr.grffile->grfid)); } } if (started > 0) { diff --git a/src/map.cpp b/src/map.cpp index f9a8ff5db9..77e510d498 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -82,7 +82,7 @@ TileIndex TileAdd(TileIndex tile, TileIndexDiff add, y = TileY(tile) + dy; if (x >= Map::SizeX() || y >= Map::SizeY()) { - std::string message = fmt::format("TILE_ADD({}) when adding 0x{:04X} and 0x{%04X} failed", + std::string message = fmt::format("TILE_ADD({}) when adding 0x{:04X} and 0x{:04X} failed", exp, tile, add); #if !defined(_MSC_VER) fmt::print(stderr, "{}:{} {}\n", file, line, message);