summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-05-03 18:01:32 (GMT)
committerhobbs <hobbs>2004-05-03 18:01:32 (GMT)
commit1a8fdcb9ffb211251d29489133279ee030fd2072 (patch)
tree2df6920e149326a5d277c10fb58b4991677e8e01 /generic
parent8817e0e722ee48ae15060b74a62569b1d2cc88eb (diff)
downloadtk-1a8fdcb9ffb211251d29489133279ee030fd2072.zip
tk-1a8fdcb9ffb211251d29489133279ee030fd2072.tar.gz
tk-1a8fdcb9ffb211251d29489133279ee030fd2072.tar.bz2
(ImgPhotoCmd): correct matched handling to that in head
Diffstat (limited to 'generic')
-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;