summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclFileName.c4
-rw-r--r--win/tclWinFile.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 15f93f4..cfd76e6 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -242,7 +242,7 @@ ExtractWinRoot(
if (path[4] == '\0') {
abs = 4;
- } else if (path [4] == ':' && path[5] == '\0') {
+ } else if (path[4] == ':' && path[5] == '\0') {
abs = 5;
}
@@ -264,7 +264,7 @@ ExtractWinRoot(
if (path[4] == '\0') {
abs = 4;
- } else if (path [4] == ':' && path[5] == '\0') {
+ } else if (path[4] == ':' && path[5] == '\0') {
abs = 5;
}
}
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 6cfeae1..2967cce 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1250,7 +1250,7 @@ WinIsReserved(
if (path[4] == '\0') {
return 4;
- } else if (path [4] == ':' && path[5] == '\0') {
+ } else if (path[4] == ':' && path[5] == '\0') {
return 4;
}
} else if ((path[2] == 'n' || path[2] == 'N') && path[3] == '\0') {
@@ -1271,7 +1271,7 @@ WinIsReserved(
if (path[4] == '\0') {
return 4;
- } else if (path [4] == ':' && path[5] == '\0') {
+ } else if (path[4] == ':' && path[5] == '\0') {
return 4;
}
}
@@ -3100,7 +3100,8 @@ TclNativeCreateNativeRep(
goto done;
}
MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, -1, nativePathPtr,
- len + 1);
+ len + 2);
+ nativePathPtr[len] = 0;
/*
* If path starts with "//?/" or "\\?\" (extended path), translate any