From f194db9aa684b494678ab9cb08c659f732af7fc6 Mon Sep 17 00:00:00 2001
From: Niels Lohmann <niels.lohmann@gmail.com>
Date: Thu, 24 Nov 2016 22:07:35 +0100
Subject: [PATCH] :white_check_mark: added assertion for warning from #368

---
 src/json.hpp      | 1 +
 src/json.hpp.re2c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/json.hpp b/src/json.hpp
index 915a60f4..81dc5f8f 100644
--- a/src/json.hpp
+++ b/src/json.hpp
@@ -8736,6 +8736,7 @@ basic_json_parser_66:
                     m_line_buffer.clear();
                     for (m_cursor = m_start; m_cursor != m_limit; ++m_cursor)
                     {
+                        assert(m_cursor != nullptr);
                         m_line_buffer.append(1, static_cast<const char>(*m_cursor));
                     }
                 }
diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c
index 9b21c828..3b2c7500 100644
--- a/src/json.hpp.re2c
+++ b/src/json.hpp.re2c
@@ -7885,6 +7885,7 @@ class basic_json
                     m_line_buffer.clear();
                     for (m_cursor = m_start; m_cursor != m_limit; ++m_cursor)
                     {
+                        assert(m_cursor != nullptr);
                         m_line_buffer.append(1, static_cast<const char>(*m_cursor));
                     }
                 }