summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-01-11 11:31:54 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-01-11 11:31:54 (GMT)
commit2a52c1f6b17be29292bd301a7ee90157e856e6f7 (patch)
tree63cd5d18b3efd2bcaaead5ebfd77d6e334e11490 /generic/tkImgPhoto.c
parentd72792591c268e1d4022885dcc8b0afeef200670 (diff)
parent225f01858954fb5bc8b0f1304167d52e7249d22d (diff)
downloadtk-2a52c1f6b17be29292bd301a7ee90157e856e6f7.zip
tk-2a52c1f6b17be29292bd301a7ee90157e856e6f7.tar.gz
tk-2a52c1f6b17be29292bd301a7ee90157e856e6f7.tar.bz2
Fix [d4fb4e80d220e46e588f310291fd7a4205e8cd67|d4fb4e80d2]: Image photo commands read/write/put do not accept "-" as first letter in file names resp. image data
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 47aa523..f6fee84 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -1675,6 +1675,10 @@ ParseSubcommandOptions(
*/
if ((allowedOptions & bit) == 0) {
+ if (optPtr->name == NULL) {
+ optPtr->name = objv[index];
+ continue;
+ }
Tcl_AppendResult(interp, "unrecognized option \"",
Tcl_GetString(objv[index]),
"\": must be ", NULL);