Skip to content

Commit 96d0e5f

Browse files
kevinbackhouseneheb
authored andcommitted
Allow c_data() to return zero byte buffer.
1 parent b66ebd9 commit 96d0e5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ const byte* Exiv2::DataBuf::c_data(size_t offset) const {
176176
if (pData_.empty()) {
177177
return nullptr;
178178
}
179-
if (offset >= pData_.size()) {
179+
if (offset > pData_.size()) {
180180
throw std::out_of_range("Overflow in Exiv2::DataBuf::c_data");
181181
}
182182
return &pData_[offset];

0 commit comments

Comments
 (0)