diff options
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r-- | generic/tkImgPhoto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index cadbb2d..e619910 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -577,7 +577,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( |