summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fl_read_image.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fl_read_image.cxx b/src/fl_read_image.cxx
index 2df98db70..f253c2aa8 100644
--- a/src/fl_read_image.cxx
+++ b/src/fl_read_image.cxx
@@ -137,7 +137,7 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate
// screen dimensions
Fl::screen_xywh(sx, sy, sw, sh, fl_screen);
}
- if (!win || (dx >= sx && dy >= sy && dx + w <= sw && dy + h <= sh)) {
+ if (!win || (dx >= sx && dy >= sy && dx + w <= sx+sw && dy + h <= sy+sh)) {
// the image is fully contained, we can use the traditional method
// however, if the window is obscured etc. the function will still fail. Make sure we
// catch the error and continue, otherwise an exception will be thrown.