diff --git a/src/strings.cpp b/src/strings.cpp --- a/src/strings.cpp +++ b/src/strings.cpp @@ -39,6 +39,7 @@ #include "newgrf_engine.h" #include "core/backup_type.hpp" #include +#include #include "table/strings.h" #include "table/control_codes.h" @@ -382,7 +383,7 @@ static char *FormatZerofillNumber(char * static char *FormatHexNumber(char *buff, uint64 number, const char *last) { - return buff + seprintf(buff, last, "0x" OTTD_PRINTFHEX64, number); + return strecpy(buff, fmt::format("0x{:X}", number).c_str(), last); } /**