From c5ce5addd968b746552106af6e2b455e7776a85f Mon Sep 17 00:00:00 2001 From: trustable-code Date: Tue, 5 Jun 2018 18:15:53 +0200 Subject: On Windows: Don't set the string terminator any more. This change is needed to be compatible with latest Nim. See issue #26. --- src/nigui/private/windows/platform_impl.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nigui/private/windows/platform_impl.nim b/src/nigui/private/windows/platform_impl.nim index 63c7b7c..36c262a 100755 --- a/src/nigui/private/windows/platform_impl.nim +++ b/src/nigui/private/windows/platform_impl.nim @@ -63,7 +63,7 @@ proc pUtf8ToUtf16(s: string): string = result = newString(characters * 2 + 1) characters = MultiByteToWideChar(CP_UTF8, 0, s, s.len.int32, result, characters.int32) # do the conversion result[characters * 2] = '\0' - result[characters * 2 + 1] = '\0' + # result[characters * 2 + 1] is set to '\0' automatically if characters == 0: pRaiseLastOSError() proc pUtf16ToUtf8(s: string, searchEnd = false): string = -- cgit v1.2.3