summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-05-03 18:01:32 (GMT)
committerhobbs <hobbs>2004-05-03 18:01:32 (GMT)
commit823b7580b6622f742ca2dc4d42ff0c42dbc7729a (patch)
tree2df6920e149326a5d277c10fb58b4991677e8e01 /generic/tkImgPhoto.c
parent8d848e4fd32bdda554af3dd22918b3cfa66e8044 (diff)
downloadtk-823b7580b6622f742ca2dc4d42ff0c42dbc7729a.zip
tk-823b7580b6622f742ca2dc4d42ff0c42dbc7729a.tar.gz
tk-823b7580b6622f742ca2dc4d42ff0c42dbc7729a.tar.bz2
(ImgPhotoCmd): correct matched handling to that in head
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index eea00ef..6702946 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -17,7 +17,7 @@
* Department of Computer Science,
* Australian National University.
*
- * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.7 2004/05/03 17:59:21 hobbs Exp $
+ * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.8 2004/05/03 18:01:32 hobbs Exp $
*/
#include "tkInt.h"
@@ -937,17 +937,18 @@ ImgPhotoCmd(clientData, interp, objc, objv)
*/
if (options.options & OPT_FORMAT) {
+ matched = 0;
for (imageFormat = tsdPtr->formatList; imageFormat != NULL;
imageFormat = imageFormat->nextPtr) {
if ((strncasecmp(Tcl_GetString(options.format),
imageFormat->name, strlen(imageFormat->name)) == 0)) {
+ matched = 1;
if (imageFormat->stringWriteProc != NULL) {
stringWriteProc = imageFormat->stringWriteProc;
break;
}
}
}
- matched = 0;
if (stringWriteProc == NULL) {
oldformat = 1;
for (imageFormat = tsdPtr->oldFormatList; imageFormat != NULL;