Skip to content

Commit 4c5832a

Browse files
kevingrantcdunn2001
authored andcommitted
Fix bug in ValueIteratorBase::operator-
1 parent 8ba9875 commit 4c5832a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/json/value.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ class JSON_API ValueIteratorBase {
946946
bool operator!=(const SelfType& other) const { return !isEqual(other); }
947947

948948
difference_type operator-(const SelfType& other) const {
949-
return computeDistance(other);
949+
return other.computeDistance(*this);
950950
}
951951

952952
/// Return either the index or the member name of the referenced value as a

0 commit comments

Comments
 (0)