summaryrefslogtreecommitdiffstats
path: root/win/tkWinInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinInit.c')
-rw-r--r--win/tkWinInit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win/tkWinInit.c b/win/tkWinInit.c
index 780888a..e3c75de 100644
--- a/win/tkWinInit.c
+++ b/win/tkWinInit.c
@@ -199,7 +199,7 @@ TkWin32ErrorObj(
}
#ifdef _UNICODE
- Tcl_WinTCharToUtf(lpBuffer, wcslen(lpBuffer) * sizeof (WCHAR), &ds);
+ Tcl_WinTCharToUtf(lpBuffer, -1, &ds);
errPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
Tcl_DStringFree(&ds);
#else