uri: don't rebase null views

This commit is contained in:
Danny Robson 2022-02-22 14:18:03 +10:00
parent dbf19c5a2b
commit 2c18bc3488

View File

@ -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 };
}