summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-10 13:26:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-10 13:26:43 (GMT)
commit615b18fee4adf12d21c4019aa7b3bc8a96ff2344 (patch)
tree19cad5e4c895e3f95f2d48368d0f64eb2177ace9 /win/tclWinFile.c
parent20e0998a323f571ddb5f5aaf9789dcc8fa6b06b7 (diff)
parent45c9e44c82a3494ca972276c1454a9bda8e0900e (diff)
downloadtcl-615b18fee4adf12d21c4019aa7b3bc8a96ff2344.zip
tcl-615b18fee4adf12d21c4019aa7b3bc8a96ff2344.tar.gz
tcl-615b18fee4adf12d21c4019aa7b3bc8a96ff2344.tar.bz2
Fix [ed5be77734]: win: "comx:" not recognized as serial port
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 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