From 823b7580b6622f742ca2dc4d42ff0c42dbc7729a Mon Sep 17 00:00:00 2001 From: hobbs Date: Mon, 3 May 2004 18:01:32 +0000 Subject: (ImgPhotoCmd): correct matched handling to that in head --- 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