From 480ed2e7f3285187497f21d022f1dc95e7407928 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 7 Oct 2002 22:02:12 +0000 Subject: [PATCH] Fixed bug in ReadAttrString(): The resulting string was one character longer, when the string in the attribute was null terminated. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1437 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/storage/Node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/storage/Node.cpp b/src/kits/storage/Node.cpp index b8375e7bab..dd8ba25240 100644 --- a/src/kits/storage/Node.cpp +++ b/src/kits/storage/Node.cpp @@ -569,7 +569,7 @@ BNode::ReadAttrString(const char *name, BString *result) const // Null terminate the new string just to be sure (since it *is* // possible to read and write non-NULL-terminated strings) data[bytes] = 0; - result->UnlockBuffer(bytes+1); + result->UnlockBuffer(); return error; }