diff options
author | Kevin Walzer <kw@codebykevin.com> | 2021-08-30 20:57:11 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2021-08-30 20:57:11 (GMT) |
commit | ad90033ce1bb3f1be8a009cb3d596578f654acf6 (patch) | |
tree | 1d7a3d35e467e4c407e8a69dfbed27406d301195 | |
parent | 17bfdac0145370ef0014e8b7e25833e00669bcfc (diff) | |
download | tk-ad90033ce1bb3f1be8a009cb3d596578f654acf6.zip tk-ad90033ce1bb3f1be8a009cb3d596578f654acf6.tar.gz tk-ad90033ce1bb3f1be8a009cb3d596578f654acf6.tar.bz2 |
Fix argument parsing in test suite
-rw-r--r-- | win/tkWinWm.c | 7 |
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; } |