summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPNG.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-14 11:16:52 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-14 11:16:52 (GMT)
commitea5beb5b384263ed1b94344281de3232efef0dd0 (patch)
treefa76e282012fa2a3b10877a7484aef3eca07a6dc /generic/tkImgPNG.c
parent626d7152122d3acfc5eafe232d0b81a4cbda5141 (diff)
parentad861a0433fe3325ce081e6df2b40ed7fd670fe9 (diff)
downloadtk-ea5beb5b384263ed1b94344281de3232efef0dd0.zip
tk-ea5beb5b384263ed1b94344281de3232efef0dd0.tar.gz
tk-ea5beb5b384263ed1b94344281de3232efef0dd0.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tkImgPNG.c')
-rw-r--r--generic/tkImgPNG.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c
index 0c62b58..0e0e59c 100644
--- a/generic/tkImgPNG.c
+++ b/generic/tkImgPNG.c
@@ -623,10 +623,10 @@ ReadData(
}
while (destSz) {
- size_t blockSz = PNG_MIN(destSz, PNG_BLOCK_SZ);
+ TkSizeT blockSz = PNG_MIN(destSz, PNG_BLOCK_SZ);
- blockSz = (size_t)Tcl_Read(pngPtr->channel, (char *)destPtr, blockSz);
- if (blockSz == (size_t)-1) {
+ blockSz = Tcl_Read(pngPtr->channel, (char *)destPtr, blockSz);
+ if (blockSz == TCL_IO_FAILURE) {
/* TODO: failure info... */
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"channel read failed: %s", Tcl_PosixError(interp)));