diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-06-20 12:39:45 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-06-20 12:39:45 (GMT) |
commit | 30fc8288f30a0b85762005fe52e18d254044d43b (patch) | |
tree | cc6a6199b2314475853510aba090a1016d99641e /win/tkWinInit.c | |
parent | 59237b6ac5e62f44c6451465d76f19bb3c97469b (diff) | |
download | tk-30fc8288f30a0b85762005fe52e18d254044d43b.zip tk-30fc8288f30a0b85762005fe52e18d254044d43b.tar.gz tk-30fc8288f30a0b85762005fe52e18d254044d43b.tar.bz2 |
Don't use wcslen() in combination with Tcl_WinTCharToUtf(): Using -1 has the same effect already (it even was wrong in tkWinTest.c's previous commit, forgot to multiply with sizeof(WCHAR)).
Diffstat (limited to 'win/tkWinInit.c')
-rw-r--r-- | win/tkWinInit.c | 2 |
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 |