summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2021-08-30 20:57:11 (GMT)
committerKevin Walzer <kw@codebykevin.com>2021-08-30 20:57:11 (GMT)
commitad90033ce1bb3f1be8a009cb3d596578f654acf6 (patch)
tree1d7a3d35e467e4c407e8a69dfbed27406d301195
parent17bfdac0145370ef0014e8b7e25833e00669bcfc (diff)
downloadtk-ad90033ce1bb3f1be8a009cb3d596578f654acf6.zip
tk-ad90033ce1bb3f1be8a009cb3d596578f654acf6.tar.gz
tk-ad90033ce1bb3f1be8a009cb3d596578f654acf6.tar.bz2
Fix argument parsing in test suite
-rw-r--r--win/tkWinWm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 6a23ff3..0c69837 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -4295,7 +4295,12 @@ WmIconphotoCmd(
unsigned size;
(void)tkwin;
- if ((objc == 3) && (base_icon == NULL)) {
+ if (strcmp(Tcl_GetString(objv[1]), "iconphoto") != 0) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("Argument should be \"iconphoto\"", -1));
+ return TCL_ERROR;
+ }
+
+ if ((objc == 3) && (strcmp(Tcl_GetString(objv[1]), "iconphoto") == 0) && base_icon == NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("", -1));
return TCL_OK;
}