From 1e2c72fcfc16119a7db98020316646204bb3e35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 29 Aug 2010 21:34:35 +0000 Subject: [PATCH] * 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 --- .../layers/attribute_overlay/attribute_overlay.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/layers/attribute_overlay/attribute_overlay.cpp b/src/add-ons/kernel/file_systems/layers/attribute_overlay/attribute_overlay.cpp index d0ff0e6eb1..673e80a611 100644 --- a/src/add-ons/kernel/file_systems/layers/attribute_overlay/attribute_overlay.cpp +++ b/src/add-ons/kernel/file_systems/layers/attribute_overlay/attribute_overlay.cpp @@ -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;