Skip to content

Commit

Permalink
Explicit cast of -1 to zsize_t
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr committed Aug 31, 2023
1 parent f8b7ecc commit 69675a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/writer/contentProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace zim
return Blob(nullptr, 0);
}

if(fd->readAt(buffer.get(), zim::zsize_t(sizeToRead), zim::offset_t(offset)).v == -1UL) {
if(fd->readAt(buffer.get(), zim::zsize_t(sizeToRead), zim::offset_t(offset)) == zim::zsize_t(-1)) {
throw std::runtime_error("Error reading file " + filepath);
}
offset += sizeToRead;
Expand Down

0 comments on commit 69675a1

Please sign in to comment.