summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-01-11 10:51:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-01-11 10:51:15 (GMT)
commit92c41abbd48f10bdb31acf6b98b7cf6d448c66cc (patch)
tree68dc8a4d9a6b01fe2552e0189e05f9455cdf9887 /generic/tkImgPhoto.c
parentaa9bd3dbdd1d48a32b4e6315b190be65d430f57d (diff)
downloadtk-92c41abbd48f10bdb31acf6b98b7cf6d448c66cc.zip
tk-92c41abbd48f10bdb31acf6b98b7cf6d448c66cc.tar.gz
tk-92c41abbd48f10bdb31acf6b98b7cf6d448c66cc.tar.bz2
Alternative proposed solution for [d4fb4e80d220e46e588f310291fd7a4205e8cd67|d4fb4e80d2], with test-case.
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 4ee9f69..1bd0142 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -1540,7 +1540,11 @@ ParseSubcommandOptions(
*/
if (!(allowedOptions & bit)) {
- goto unknownOrAmbiguousOption;
+ if (optPtr->name != NULL) {
+ goto unknownOrAmbiguousOption;
+ }
+ optPtr->name = objv[index];
+ continue;
}
/*