From 3be63ecdb68cfecb54952e5a6c9c9d8b50e66156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 13 Jun 2025 18:01:50 +0200 Subject: [PATCH] Fix Mono build on Windows after `String::resize` rename --- modules/mono/utils/path_utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/mono/utils/path_utils.cpp b/modules/mono/utils/path_utils.cpp index 4f9578db994..f9bb35425bd 100644 --- a/modules/mono/utils/path_utils.cpp +++ b/modules/mono/utils/path_utils.cpp @@ -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);