diff --git a/uri.cpp b/uri.cpp index c5017d00..03a4c224 100644 --- a/uri.cpp +++ b/uri.cpp @@ -205,7 +205,9 @@ void uri::clear_fragment () m_views[FRAGMENT].begin () - m_value.data (), m_views[FRAGMENT].size () ); - m_views[FRAGMENT] = nullptr; + // Don't set this to nullptr. Other code assumes these views aren't null + // (eg, for offsetting during copy construction). + m_views[FRAGMENT] = { m_views[FRAGMENT].begin (), 0 }; }