Skip to content

Commit

Permalink
Fix signed-unsigned comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
joto committed Feb 21, 2019
1 parent b36774c commit 8c6acbf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed


## [unreleased] -

### Fixed

- Signed-unsigned comparison on 32 bit systems.


## [1.6.6] - 2018-02-20

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion include/protozero/pbf_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class pbf_reader {
}

void skip_bytes(pbf_length_type len) {
if (m_end - m_data < len) {
if (m_end - m_data < static_cast<ptrdiff_t>(len)) {
throw end_of_buffer_exception{};
}
m_data += len;
Expand Down

0 comments on commit 8c6acbf

Please sign in to comment.