mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-16 15:29:57 +00:00
base/sesson_label.h: do not prefix empty strings
Session_label prefix(a, b) shall not return ' -> b' or 'a -> '. Issue #1787
This commit is contained in:
parent
0b247f81f8
commit
1ae0357171
@ -91,10 +91,10 @@ namespace Genode {
|
||||
inline Session_label prefixed_label(String<N1> const &prefix,
|
||||
String<N2> const &label)
|
||||
{
|
||||
if (!prefix.valid())
|
||||
if (!prefix.valid() || prefix == "")
|
||||
return Session_label(label.string());
|
||||
|
||||
if (!label.valid())
|
||||
if (!label.valid() || label == "")
|
||||
return Session_label(prefix.string());
|
||||
|
||||
char buf[Session_label::capacity()];
|
||||
|
Loading…
x
Reference in New Issue
Block a user