Skip to content

Commit fb17080

Browse files
committed
- Added unit tests for comparison operators (except compare())
- Fixed Value::operator <= implementation (had the semantic of operator >=). Found when addigin unit tests for comparison operators.
1 parent e0e1fd3 commit fb17080

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

NEWS.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@
8686

8787
- Bug #3139678: stack buffer overflow when parsing a double with a
8888
length of 32 characters.
89+
90+
- Fixed Value::operator <= implementation (had the semantic of operator >=).
91+
Found when addigin unit tests for comparison operators.
8992

9093
* License
9194

src/lib_json/json_value.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ Value::operator <( const Value &other ) const
600600
bool
601601
Value::operator <=( const Value &other ) const
602602
{
603-
return !(other > *this);
603+
return !(other < *this);
604604
}
605605

606606
bool

0 commit comments

Comments
 (0)