From 96b5480b3fad98e69b922999285bf0d8ba1ec786 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 6 May 2009 15:26:30 +0000 Subject: [PATCH] Simplification. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30646 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/support/String.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/support/String.cpp b/src/kits/support/String.cpp index 042f5e8c10..9358e743a4 100644 --- a/src/kits/support/String.cpp +++ b/src/kits/support/String.cpp @@ -1419,7 +1419,7 @@ BString::LockBuffer(int32 maxLength) { int32 length = Length(); if (maxLength > length) - length += maxLength - length; + length = maxLength; if (_DetachWith(fPrivateData, length) == B_OK) { _ReferenceCount() = -1;