From a1240f5f04af81efc968fb824368b10163f4fffb Mon Sep 17 00:00:00 2001 From: baldurk Date: Sun, 13 Nov 2022 14:20:35 +0000 Subject: [PATCH] Fix mac compilation --- renderdoc/os/posix/apple/apple_stringio.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/renderdoc/os/posix/apple/apple_stringio.cpp b/renderdoc/os/posix/apple/apple_stringio.cpp index b32b3bb9b..44c2e129a 100644 --- a/renderdoc/os/posix/apple/apple_stringio.cpp +++ b/renderdoc/os/posix/apple/apple_stringio.cpp @@ -237,7 +237,8 @@ rdcstr Wide2UTF8(const rdcwstr &s) // utf-8 characters can be max 4 bytes. size_t len = (s.length() + 1) * 4; - rdcarray charBuffer(len); + rdcarray charBuffer; + charBuffer.resize(len); size_t ret; @@ -281,7 +282,8 @@ rdcwstr UTF82Wide(const rdcstr &s) // input. size_t len = s.length() + 1; - rdcarray wcharBuffer(len); + rdcarray wcharBuffer; + wcharBuffer.resize(len); size_t ret;