diff --git a/repos/base/include/util/string.h b/repos/base/include/util/string.h index 9d84c3b7a0..2c53934a88 100644 --- a/repos/base/include/util/string.h +++ b/repos/base/include/util/string.h @@ -630,9 +630,9 @@ class Genode::String * Copy constructor */ template - String(String const &other) : _len(min(other._len, CAPACITY)) + String(String const &other) : _len(min(other.length(), CAPACITY)) { - Genode::strncpy(_buf, other._buf, _len); + Genode::strncpy(_buf, other.string(), _len); } /**