* FindAttribute() was broken and would find partial names (ie. if an attribute

with the name "abc" existed, it would be returned when opening any attribute
  starting with "abc".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38432 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-08-29 21:34:35 +00:00
parent b96cb61620
commit 1e2c72fcfc
@@ -766,8 +766,7 @@ AttributeEntry *
AttributeFile::FindAttribute(const char *name, uint32 *index)
{
for (uint32 i = 0; i < fFile->entry_count; i++) {
if (strncmp(fEntries[i]->Name(), name, fEntries[i]->NameLength())
== 0) {
if (strcmp(fEntries[i]->Name(), name) == 0) {
if (index)
*index = i;