diff options
author | fvogel <fvogelnew1@free.fr> | 2015-06-01 20:19:20 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2015-06-01 20:19:20 (GMT) |
commit | 21c0a3620120d2c3de6c50f2233cca8aa4721079 (patch) | |
tree | 1d7562f6cf558a4ce2b35ca0c7924b3ba02c77b2 /generic/tkImgPhoto.c | |
parent | d8a583a54508651a0ca4055400773b2b718c09d5 (diff) | |
download | tk-21c0a3620120d2c3de6c50f2233cca8aa4721079.zip tk-21c0a3620120d2c3de6c50f2233cca8aa4721079.tar.gz tk-21c0a3620120d2c3de6c50f2233cca8aa4721079.tar.bz2 |
Fixed broken trunk caused by "signed/unsigned mismatch" compiler error on Windows, introduced by [4fe3c06b97] and [07622d5618]
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r-- | generic/tkImgPhoto.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 7fa894c..3e03f3d 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -891,7 +891,7 @@ ImgPhotoCmd( * May not be able to trigger/ demo / test this. */ - if (dataWidth > (UINT_MAX/3) / dataHeight) { + if (dataWidth > (int)((UINT_MAX/3) / dataHeight)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "photo image dimensions exceed Tcl memory limits", -1)); Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", @@ -2223,7 +2223,7 @@ ImgPhotoSetSize( || (masterPtr->pix32 == NULL)) { unsigned newPixSize; - if (pitch && height > UINT_MAX / pitch) { + if (pitch && height > (int)(UINT_MAX / pitch)) { return TCL_ERROR; } newPixSize = height * pitch; @@ -3721,7 +3721,7 @@ ImgGetPhoto( newPixelSize += 2; } - if (blockPtr->height > (UINT_MAX/newPixelSize)/blockPtr->width) { + if (blockPtr->height > (int)((UINT_MAX/newPixelSize)/blockPtr->width)) { return NULL; } data = attemptckalloc(newPixelSize*blockPtr->width*blockPtr->height); |