xml_unquoted: fix bug with string of length 0

Ref #4922
This commit is contained in:
Martin Stein 2023-06-29 11:13:48 +02:00 committed by Norman Feske
parent 852bc3fc62
commit c05a0eca86

View File

@ -1070,7 +1070,7 @@ class Genode::Xml_unquoted : Noncopyable
template <size_t N>
Xml_unquoted(String<N> const &string)
: _content_ptr({ string.string(), string.length() - 1})
: _content_ptr({ string.string(), string.length() ? string.length() - 1 : 0 })
{ }
void print(Output &out) const