1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-03 04:05:49 +01:00

Fix compatibility with GCC 13.1

This commit is contained in:
Michał Janiszewski
2023-05-06 23:02:02 +02:00
parent 1917a0b3f5
commit be145da783

View File

@@ -73,7 +73,12 @@ public:
{
throw std::runtime_error("Unable to open " + path);
}
return std::string((std::istreambuf_iterator<char>(fs)), std::istreambuf_iterator<char>());
auto length = fs.tellg();
char* buffer = new char[length];
fs.read(buffer, length);
auto result = std::string(buffer, buffer + length);
delete[] buffer;
return result;
}
/**