From 636e645436832bda39a3110ca6d792d71772e8c3 Mon Sep 17 00:00:00 2001 From: Sour Date: Fri, 27 Dec 2024 14:21:08 +0900 Subject: [PATCH] Debugger: Fixed code comments not supporting non-ASCII text Entering CJK characters or accented characters in a comment resulted in ? characters in the disassembly, etc. --- UI/Interop/DebugApi.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/Interop/DebugApi.cs b/UI/Interop/DebugApi.cs index 166b8e81..d5ab2298 100644 --- a/UI/Interop/DebugApi.cs +++ b/UI/Interop/DebugApi.cs @@ -220,7 +220,7 @@ public static byte[] GetFrozenState(CpuType cpuType, UInt32 start, UInt32 end) [DllImport(DllPath)] public static extern AddressInfo GetAbsoluteAddress(AddressInfo relAddress); [DllImport(DllPath)] public static extern AddressInfo GetRelativeAddress(AddressInfo absAddress, CpuType cpuType); - [DllImport(DllPath)] public static extern void SetLabel(uint address, MemoryType memType, string label, string comment); + [DllImport(DllPath)] public static extern void SetLabel(uint address, MemoryType memType, [MarshalAs(UnmanagedType.LPUTF8Str)] string label, [MarshalAs(UnmanagedType.LPUTF8Str)] string comment); [DllImport(DllPath)] public static extern void ClearLabels(); [DllImport(DllPath)] public static extern void SetBreakpoints([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] InteropBreakpoint[] breakpoints, UInt32 length);