summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-06-09 17:36:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-06-09 17:36:51 (GMT)
commitdd29f2b0bbbf61c0937023c302b62112098933b3 (patch)
tree48509da871ca2820474aa73325f6f7165df02902 /generic
parentd454776e552a10ca739f2608e45607d72f9cda2e (diff)
parent13ad83e207e848df4017b03f3f51087b16c2b079 (diff)
downloadtk-dd29f2b0bbbf61c0937023c302b62112098933b3.zip
tk-dd29f2b0bbbf61c0937023c302b62112098933b3.tar.gz
tk-dd29f2b0bbbf61c0937023c302b62112098933b3.tar.bz2
Fix [a0241c0e25]: photo image copy command can unexpectedly hang for 20+ seconds.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkImgPhoto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index f45fac5..28c1b5b 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -661,7 +661,7 @@ ImgPhotoCmd(
return TCL_ERROR;
}
Tk_PhotoGetImage(srcHandle, &block);
- if ((options.fromX2 > block.width) || (options.fromY2 > block.height)
+ if ((options.fromX > block.width) || (options.fromY > block.height)
|| (options.fromX2 > block.width)
|| (options.fromY2 > block.height)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(