From 6dee8866a87ab582cd6045c15028c705e7db91fd Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 5 May 2020 12:40:04 +0200 Subject: [PATCH] :bug: fix binary comparison --- include/nlohmann/json.hpp | 2 +- single_include/nlohmann/json.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index f2420dad..f85e8e47 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -6310,7 +6310,7 @@ class basic_json return (lhs.m_value.number_float) < (rhs.m_value.number_float); case value_t::binary: - return (lhs.m_value.binary) < (rhs.m_value.binary); + return (*lhs.m_value.binary) < (*rhs.m_value.binary); default: return false; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index f107723a..a1bf8c8b 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -21817,7 +21817,7 @@ class basic_json return (lhs.m_value.number_float) < (rhs.m_value.number_float); case value_t::binary: - return (lhs.m_value.binary) < (rhs.m_value.binary); + return (*lhs.m_value.binary) < (*rhs.m_value.binary); default: return false;