summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/tclWinFile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index ad4a5c4..1cdd53f 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -2900,7 +2900,7 @@ TclNativeCreateNativeRep(
WCHAR *nativePathPtr;
const char *str;
Tcl_Obj *validPathPtr;
- int len;
+ size_t len;
WCHAR *wp;
if (TclFSCwdIsNative()) {
@@ -2926,7 +2926,8 @@ TclNativeCreateNativeRep(
Tcl_IncrRefCount(validPathPtr);
}
- str = Tcl_GetStringFromObj(validPathPtr, &len);
+ str = Tcl_GetString(validPathPtr);
+ len = validPathPtr->length;
if (strlen(str)!=len) {
/* String contains NUL-bytes. This is invalid. */