From e7d5b34fc5b5213acfd9d3fff7feb4e4d1943318 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 5 Sep 2016 10:49:39 +0200 Subject: [PATCH] base: String constructor for different lengths Let the copy constructor compile for different CAPACITYs of the String class. Fix #2085 --- repos/base/include/util/string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } /**