Use macro to generate correct format specifier (#2400)

Windows and Linux use different data models on 64 bit systems so "%lld"
isn't the same on them.
This commit is contained in:
Michael Cook (mackal) 2022-08-28 14:38:26 -04:00 committed by GitHub
parent 94ac04b360
commit 59584a8d94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@
#include <fmt/format.h>
#include <algorithm>
#include <cctype>
#include <cinttypes>
#ifdef _WINDOWS
#include <windows.h>
@ -243,7 +244,7 @@ char *RemoveApostrophes(const char *s)
const char *ConvertArray(int64 input, char *returnchar)
{
sprintf(returnchar, "%lld", input);
sprintf(returnchar, "%" PRId64, input);
return returnchar;
}