diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-10 13:26:43 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-10 13:26:43 (GMT) |
commit | 615b18fee4adf12d21c4019aa7b3bc8a96ff2344 (patch) | |
tree | 19cad5e4c895e3f95f2d48368d0f64eb2177ace9 /win/tclWinFile.c | |
parent | 20e0998a323f571ddb5f5aaf9789dcc8fa6b06b7 (diff) | |
parent | 45c9e44c82a3494ca972276c1454a9bda8e0900e (diff) | |
download | tcl-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.c | 7 |
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 |