Skip to content

Commit

Permalink
fix compare with diff signs
Browse files Browse the repository at this point in the history
  • Loading branch information
carltimmer committed Sep 20, 2024
1 parent 6e0ab41 commit 5ead07e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libsrc++/ByteBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ namespace evio {
throw EvioException("buffer pos of " + std::to_string(p) + " will exceed limit of " + std::to_string(lim));
}
pos = p;
if (mrk > pos) {
if (mrk > -1 && (size_t) mrk > pos) {
mrk = -1;
}
return *this;
Expand All @@ -614,7 +614,7 @@ namespace evio {
pos = lim;
}

if (mrk > lim) {
if (mrk > -1 && (size_t)mrk > lim) {
mrk = -1;
}
return *this;
Expand Down

0 comments on commit 5ead07e

Please sign in to comment.