From 8bc808a92a550003e45149a7bf05c5eddfd0dd3a Mon Sep 17 00:00:00 2001
From: hobbs <hobbs@noemail.net>
Date: Mon, 3 May 2004 18:01:31 +0000
Subject: (ImgPhotoCmd): correct matched handling to that in head

FossilOrigin-Name: 6387e3161d63fb2df19aab8e3199069ee51c9ebd
---
 generic/tkImgPhoto.c | 5 +++--
 1 file 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;
-- 
cgit v0.12