From b1958593ecd5ec4f7342efdb8ae3039ed55500e0 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 7 Sep 2019 14:41:08 +0200 Subject: [PATCH] Fixed CreateStringEvalValue creating strings with wrong char width --- PorygonSharp/EvalValues/EvalValueCreator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PorygonSharp/EvalValues/EvalValueCreator.cs b/PorygonSharp/EvalValues/EvalValueCreator.cs index 732da53..50821f8 100644 --- a/PorygonSharp/EvalValues/EvalValueCreator.cs +++ b/PorygonSharp/EvalValues/EvalValueCreator.cs @@ -77,7 +77,7 @@ namespace PorygonSharp.EvalValues [DllImport("PorygonLang", EntryPoint = "CreateBoolEvalValue",CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr CreateBoolEvalValue(bool b); [DllImport("PorygonLang", EntryPoint = "CreateStringEvalValue",CallingConvention = CallingConvention.Cdecl)] - private static extern IntPtr CreateStringEvalValue(string s); + private static extern IntPtr CreateStringEvalValue([MarshalAs(UnmanagedType.LPWStr)]string s); [DllImport("PorygonLang", EntryPoint = "CreateUserDataEvalValue",CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr CreateUserDataEvalValue(uint typeHash, IntPtr obj);