diff --git a/NEWS.txt b/NEWS.txt index 7978c0a..9b5d69c 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -86,6 +86,9 @@ - Bug #3139678: stack buffer overflow when parsing a double with a length of 32 characters. + + - Fixed Value::operator <= implementation (had the semantic of operator >=). + Found when addigin unit tests for comparison operators. * License diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index c8e0478..fd1266b 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -600,7 +600,7 @@ Value::operator <( const Value &other ) const bool Value::operator <=( const Value &other ) const { - return !(other > *this); + return !(other < *this); } bool