summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2016-07-31 09:42:24 (GMT)
committerfvogelnew1@free.fr <fvogel>2016-07-31 09:42:24 (GMT)
commitf5bc088f75876c7c6f121413f6606b64c42269a4 (patch)
treeb00d3e5df3f94869edf90e16207c7c6655209ecc
parent184f9f7243cb99c9f3945d06a128ba608a10ecfb (diff)
downloadtk-f5bc088f75876c7c6f121413f6606b64c42269a4.zip
tk-f5bc088f75876c7c6f121413f6606b64c42269a4.tar.gz
tk-f5bc088f75876c7c6f121413f6606b64c42269a4.tar.bz2
Fix for [3512539fff] removed, by popular demand
-rw-r--r--generic/tkWindow.c11
-rw-r--r--tests/window.test4
2 files changed, 3 insertions, 12 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index a55c867..0c60321 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -1133,12 +1133,10 @@ Tk_CreateWindowFromPath(
/*
* Strip the parent's name out of pathName (it's everything up to the last
- * dot). There are three tricky parts: (a) must copy the parent's name
+ * dot). There are two tricky parts: (a) must copy the parent's name
* somewhere else to avoid modifying the pathName string (for large names,
* space for the copy will have to be malloc'ed); (b) must special-case
- * the situation where the parent is "."; (c) the parent's name cannot be
- * only 1 character long because it should include both a leading dot and
- * at least one additional character.
+ * the situation where the parent is ".".
*/
p = strrchr(pathName, '.');
@@ -1157,11 +1155,6 @@ Tk_CreateWindowFromPath(
if (numChars == 0) {
*p = '.';
p[1] = '\0';
- } else if (numChars == 1) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "bad window path name \"%s\"", pathName));
- Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOW_PATH", NULL);
- return NULL;
} else {
strncpy(p, pathName, (size_t) numChars);
p[numChars] = '\0';
diff --git a/tests/window.test b/tests/window.test
index f02db3e..fea695a 100644
--- a/tests/window.test
+++ b/tests/window.test
@@ -39,9 +39,7 @@ test window-1.1 {Tk_CreateWindowFromPath procedure, parent dead} -setup {
while executing
"button .t.b -text hello"
(command bound to event)}}
-test window-1.2 {Tk_CreateWindowFromPath procedure, pathname starting with two dots} -body {
- label ..mylabel
-} -returnCodes error -result {bad window path name "..mylabel"}
+
# Most of the tests below don't produce meaningful results; they
# will simply dump core if there are bugs.