1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fix Mono build on Windows after String::resize rename

This commit is contained in:
Rémi Verschelde
2025-06-13 18:01:50 +02:00
parent 6f2ab528ca
commit 3be63ecdb6

View File

@@ -87,7 +87,7 @@ String cwd() {
const DWORD expected_size = ::GetCurrentDirectoryW(0, nullptr);
Char16String buffer;
buffer.resize((int)expected_size);
buffer.resize_uninitialized((int)expected_size);
if (::GetCurrentDirectoryW(expected_size, (wchar_t *)buffer.ptrw()) == 0) {
return ".";
}
@@ -139,7 +139,7 @@ String realpath(const String &p_path) {
}
Char16String buffer;
buffer.resize((int)expected_size);
buffer.resize_uninitialized((int)expected_size);
::GetFinalPathNameByHandleW(hFile, (wchar_t *)buffer.ptrw(), expected_size, FILE_NAME_NORMALIZED);
::CloseHandle(hFile);