From 2f454c7bb830153d6acfa0e28da0eb557ed8045a Mon Sep 17 00:00:00 2001 From: githubawn <115191165+githubawn@users.noreply.github.com> Date: Fri, 19 Jun 2026 21:44:19 +0200 Subject: [PATCH] fix(build): wrap inline assembly blocks in curly braces for MSVC parser compatibility --- Core/Libraries/Source/WWVegas/WWMath/wwmath.h | 6 ++++-- Core/Libraries/Source/profile/internal.h | 20 +++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Core/Libraries/Source/WWVegas/WWMath/wwmath.h b/Core/Libraries/Source/WWVegas/WWMath/wwmath.h index 8adda21a796..07833b5225c 100644 --- a/Core/Libraries/Source/WWVegas/WWMath/wwmath.h +++ b/Core/Libraries/Source/WWVegas/WWMath/wwmath.h @@ -336,8 +336,10 @@ WWINLINE long WWMath::Float_To_Long(double f) { #if defined(_MSC_VER) && defined(_M_IX86) long retval; - __asm fld qword ptr [f] - __asm fistp dword ptr [retval] + __asm { + fld qword ptr [f] + fistp dword ptr [retval] + } return retval; #else return (long) f; diff --git a/Core/Libraries/Source/profile/internal.h b/Core/Libraries/Source/profile/internal.h index f657b98e94f..da88664213c 100644 --- a/Core/Libraries/Source/profile/internal.h +++ b/Core/Libraries/Source/profile/internal.h @@ -58,20 +58,24 @@ class ProfileFastCS #define ts_lock _emit 0xF0 DASSERT(((unsigned)&nFlag % 4) == 0); - __asm mov ebx, [nFlag] - __asm ts_lock - __asm bts dword ptr [ebx], 0 - __asm jc The_Bit_Was_Previously_Set_So_Try_Again + __asm { + mov ebx, [nFlag] + ts_lock + bts dword ptr [ebx], 0 + jc The_Bit_Was_Previously_Set_So_Try_Again + } return; The_Bit_Was_Previously_Set_So_Try_Again: // can't use SwitchToThread() here because Win9X doesn't have it! if (testEvent) ::WaitForSingleObject(testEvent,1); - __asm mov ebx, [nFlag] - __asm ts_lock - __asm bts dword ptr [ebx], 0 - __asm jc The_Bit_Was_Previously_Set_So_Try_Again + __asm { + mov ebx, [nFlag] + ts_lock + bts dword ptr [ebx], 0 + jc The_Bit_Was_Previously_Set_So_Try_Again + } } void ThreadSafeClearFlag()