diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-12-12 23:14:22 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-12-12 23:14:22 (GMT) |
commit | 8c86e56bde55ae0c26ac7fc3a78f6a22d2181f8f (patch) | |
tree | cfdfb0f9292fbd98ebb30e6d2da31a514883db22 /generic/tkImgPhoto.c | |
parent | 32410814b7550f1e1d017ae5cff34594a7829677 (diff) | |
parent | b411de22bdd3186e8ceb610dec1d2176cf0835f9 (diff) | |
download | tk-8c86e56bde55ae0c26ac7fc3a78f6a22d2181f8f.zip tk-8c86e56bde55ae0c26ac7fc3a78f6a22d2181f8f.tar.gz tk-8c86e56bde55ae0c26ac7fc3a78f6a22d2181f8f.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r-- | generic/tkImgPhoto.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 6b92831..82bd956 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -1973,22 +1973,20 @@ ImgPhotoConfigureModel( Tcl_Obj *oldData, *data = NULL, *oldFormat, *format = NULL, *metadataInObj = NULL, *metadataOutObj = NULL; Tcl_Obj *tempdata, *tempformat; - Tcl_Size length; - Tcl_Size i, j; + Tcl_Size i, length; int result, imageWidth, imageHeight, oldformat; double oldGamma; Tcl_Channel chan; Tk_PhotoImageFormat *imageFormat; Tk_PhotoImageFormatVersion3 *imageFormatVersion3; - for (i = 0, j = 0; i < objc; i++,j++) { + for (i = 0; i < objc; i++) { const char *arg = Tcl_GetStringFromObj(objv[i], &length); if ((length > 1) && (arg[0] == '-')) { if ((arg[1] == 'd') && !strncmp(arg, "-data", length)) { if (++i < objc) { data = objv[i]; - j--; } else { Tcl_SetObjResult(interp, Tcl_NewStringObj( "value for \"-data\" missing", -1)); @@ -2000,7 +1998,6 @@ ImgPhotoConfigureModel( !strncmp(arg, "-format", length)) { if (++i < objc) { format = objv[i]; - j--; } else { Tcl_SetObjResult(interp, Tcl_NewStringObj( "value for \"-format\" missing", -1)); @@ -2012,7 +2009,6 @@ ImgPhotoConfigureModel( !strncmp(arg, "-metadata", length)) { if (++i < objc) { metadataInObj = objv[i]; - j--; } else { Tcl_SetObjResult(interp, Tcl_NewStringObj( "value for \"-metadata\" missing", -1)); |