summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index ad4a5c4..fe84a26 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,9 +2926,10 @@ TclNativeCreateNativeRep(
Tcl_IncrRefCount(validPathPtr);
}
- str = Tcl_GetStringFromObj(validPathPtr, &len);
+ str = Tcl_GetString(validPathPtr);
+ len = validPathPtr->length;
- if (strlen(str)!=len) {
+ if (strlen(str)!=(unsigned int)len) {
/* String contains NUL-bytes. This is invalid. */
return 0;
}