Skip to content

Commit

Permalink
IniFile: Fix writing 64-bit hex values.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed May 8, 2023
1 parent 9623f51 commit ce632ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Common/Data/Format/IniFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <cstdlib>
#include <cstdio>

#include <inttypes.h>

#ifndef _MSC_VER
#include <strings.h>
#endif
Expand Down Expand Up @@ -192,7 +194,7 @@ void Section::Set(const char* key, uint32_t newValue) {
}

void Section::Set(const char* key, uint64_t newValue) {
Set(key, StringFromFormat("0x%016lx", newValue).c_str());
Set(key, StringFromFormat("0x%016" PRIx64, newValue).c_str());
}

void Section::Set(const char* key, float newValue) {
Expand Down

0 comments on commit ce632ec

Please sign in to comment.