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
This commit is contained in:
parent
8c7b7c869d
commit
480ed2e7f3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user