1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Fix types passed to printf-like functions

This commit is contained in:
Michał Janiszewski
2019-02-09 22:54:33 +01:00
parent be491d3c6f
commit 70ef8151fc
6 changed files with 14 additions and 13 deletions

View File

@@ -342,9 +342,10 @@ public:
void AddObjectFromFile(const std::string_view& objectName, const void* data, size_t dataSize) override
{
utf8 path[MAX_PATH];
GetPathForNewObject(path, sizeof(path), std::string(objectName).c_str());
std::string objectNameString(objectName);
GetPathForNewObject(path, sizeof(path), objectNameString.c_str());
log_verbose("Adding object: [%s]", objectName);
log_verbose("Adding object: [%s]", objectNameString.c_str());
try
{
File::WriteAllBytes(path, data, dataSize);
@@ -352,7 +353,7 @@ public:
}
catch (const std::exception&)
{
Console::Error::WriteLine("Failed saving object: [%s] to '%s'.", objectName, path);
Console::Error::WriteLine("Failed saving object: [%s] to '%s'.", objectNameString.c_str(), path);
}
}