diff options
-rw-r--r-- | win/tkWinClipboard.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c index a00909c..8c6a4a4 100644 --- a/win/tkWinClipboard.c +++ b/win/tkWinClipboard.c @@ -149,13 +149,14 @@ TkSelGetSelection( if (drop->fWide) { WCHAR *fname = (WCHAR *) ((char *) drop + drop->pFiles); Tcl_DString dsTmp; - int count = 0, len; + int count = 0; + size_t len; while (*fname != 0) { if (count) { Tcl_DStringAppend(&ds, "\n", 1); } - len = Tcl_UniCharLen((Tcl_UniChar *) fname); + len = wcslen(fname); Tcl_WinTCharToUtf(fname, len * sizeof(WCHAR), &dsTmp); Tcl_DStringAppend(&ds, Tcl_DStringValue(&dsTmp), Tcl_DStringLength(&dsTmp)); |