From aee67d58f05972555bfd1e7ce5451da4333e6348 Mon Sep 17 00:00:00 2001 From: Marco Porsch Date: Wed, 23 Aug 2023 15:42:06 +0200 Subject: [PATCH] fail with the first unmet constraint to avoid running into type mismatches --- include/valijson/subschema.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/valijson/subschema.hpp b/include/valijson/subschema.hpp index 5e22bf5..10d795a 100644 --- a/include/valijson/subschema.hpp +++ b/include/valijson/subschema.hpp @@ -120,7 +120,7 @@ public: { bool allTrue = true; for (auto &&constraint : m_constraints) { - allTrue = applyFunction(*constraint) && allTrue; + allTrue = allTrue && applyFunction(*constraint); } return allTrue;