fix some printf format specifiers (#76)

use the definition in cinttypes for portability
This commit is contained in:
Arne Morten Kvarving 2022-08-27 09:33:01 +02:00 committed by GitHub
parent 5cba1a1185
commit 8459cd928c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 15 deletions

View file

@ -5,6 +5,7 @@
#include "Cafe/OS/libs/coreinit/coreinit_IOS.h"
#include "Cafe/OS/libs/coreinit/coreinit_Time.h"
#include <cinttypes>
#include <filesystem>
#include <fstream>
@ -102,7 +103,7 @@ namespace acp
{
// found the entry! -> update timestamp
xml::XMLElement* timestamp = account->FirstChildElement("timestamp");
sprintf(tmp, "%016llx", _acpGetTimestamp());
sprintf(tmp, "%" PRIx64, _acpGetTimestamp());
if (timestamp)
timestamp->SetText(tmp);
else
@ -125,7 +126,7 @@ namespace acp
tinyxml2::XMLElement* timestamp = doc.NewElement("timestamp");
{
sprintf(tmp, "%016llx", _acpGetTimestamp());
sprintf(tmp, "%" PRIx64, _acpGetTimestamp());
timestamp->SetText(tmp);
}
@ -506,4 +507,4 @@ namespace acp
osLib_addFunction("nn_acp", "ACPConvertNetworkTimeToOSCalendarTime", export_ACPConvertNetworkTimeToOSCalendarTime);
}
}
}
}