From a5af3d06e62e775bc67f13a3cdcd0288f6c9d4eb Mon Sep 17 00:00:00 2001 From: MouriNaruto Date: Sun, 23 Jun 2024 02:06:06 +0800 Subject: [PATCH] Continue to follow partial suggestions from mingkuang. --- src/Thunks/api-ms-win-core-winrt-string.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Thunks/api-ms-win-core-winrt-string.hpp b/src/Thunks/api-ms-win-core-winrt-string.hpp index 82766e3..7446473 100644 --- a/src/Thunks/api-ms-win-core-winrt-string.hpp +++ b/src/Thunks/api-ms-win-core-winrt-string.hpp @@ -344,7 +344,6 @@ namespace YY::Thunks reinterpret_cast(string); if (!(OpaqueString->Header.Flags & WRHF_EMBEDDED_NULLS_COMPUTED)) { - OpaqueString->Header.Flags |= WRHF_EMBEDDED_NULLS_COMPUTED; for (UINT32 i = 0; i < OpaqueString->Header.Length; ++i) { if (OpaqueString->Header.StringRef[i] == L'\0') @@ -353,6 +352,7 @@ namespace YY::Thunks break; } } + OpaqueString->Header.Flags |= WRHF_EMBEDDED_NULLS_COMPUTED; } *hasEmbedNull = OpaqueString->Header.Flags & WRHF_HAS_EMBEDDED_NULLS; }