Skip to content

Commit

Permalink
Fixing error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tesonep committed Jan 16, 2023
1 parent 32b390b commit 466c56b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/imageAccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ size_t basicImageFileRead(void * initialPtr, size_t sz, size_t count, sqImageFil

lastReadBytes = fread(currentPtr, 1, chunkToRead, (FILE*)f);

if(lastReadBytes < 0){
if(lastReadBytes < chunkToRead){
logErrorFromErrno("fread");
return lastReadBytes;
}
Expand Down

0 comments on commit 466c56b

Please sign in to comment.