From 5b5f0090a16a507cbf5ba54a52d98e726c6efc8f Mon Sep 17 00:00:00 2001
From: Niels Lohmann <mail@nlohmann.me>
Date: Sat, 22 Jul 2017 16:41:42 +0200
Subject: [PATCH] :hammer: trying to fix the sanitizer error

Travis found an error with Clang 3.8's sanitizers, see https://travis-ci.org/nlohmann/json/jobs/256366699. Unfortunately, I cannot reproduce this error with clang version 6.0.0 (trunk 308825) locally. However, this seems to be an issue, because so far, we did not reset a value after moving from it.
---
 src/json.hpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/json.hpp b/src/json.hpp
index df162274..3cda3f1e 100644
--- a/src/json.hpp
+++ b/src/json.hpp
@@ -3281,6 +3281,7 @@ class parser
                 while (true)
                 {
                     // parse value
+                    value = value_t::discarded;
                     parse_internal(keep, value);
                     if (keep and not value.is_discarded())
                     {