diff options
author | Sebastian Geerken <devnull@localhost> | 2013-06-16 14:30:51 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2013-06-16 14:30:51 +0200 |
commit | 7cecc9df0854e5b4141af7df3d03de75b29039b8 (patch) | |
tree | 25c3154bc3897f8d6a5d7d61c909672341271194 | |
parent | 17f952357929cf26a60ad6cc0a08693d0922ed25 (diff) |
Comment.
-rw-r--r-- | dw/fltkimgbuf.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dw/fltkimgbuf.cc b/dw/fltkimgbuf.cc index c09c42c6..a63a9a89 100644 --- a/dw/fltkimgbuf.cc +++ b/dw/fltkimgbuf.cc @@ -62,8 +62,12 @@ void FltkImgbuf::init (Type type, int width, int height, FltkImgbuf *root) width, height); init (type, 1, 1, root); } else if (width > MAX_WIDTH) { - // Too large dimensions cause rounding dangerous overflow - // errors, so we limit dimensions to harmless values. + // Too large dimensions cause dangerous overflow errors, so we + // limit dimensions to harmless values. + // + // Example: 65535 * 65536 / 65536 (see scaling below) results in + // the negative value -1. + MSG("FltkImgbuf::init: cannot handle large width %d\n", width); init (type, MAX_WIDTH, height, root); } else if (height > MAX_HEIGHT) { |