From 690a7f3d47063a25241d33554c48810c6eed3183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Knoci=C5=84ski?= Date: Thu, 6 Dec 2012 22:50:57 +0100 Subject: [PATCH] BStringList: Fix compare_private_data[ignore_case]() Signed-off-by: Ingo Weinhold --- src/kits/support/StringList.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kits/support/StringList.cpp b/src/kits/support/StringList.cpp index 900322d967..7b453d825a 100644 --- a/src/kits/support/StringList.cpp +++ b/src/kits/support/StringList.cpp @@ -17,16 +17,16 @@ static int compare_private_data(const void* a, const void* b) { - return BString::Private::StringFromData((char*)a).Compare( - BString::Private::StringFromData((char*)b)); + return BString::Private::StringFromData(*(char**)a).Compare( + BString::Private::StringFromData(*(char**)b)); } static int compare_private_data_ignore_case(const void* a, const void* b) { - return BString::Private::StringFromData((char*)a).ICompare( - BString::Private::StringFromData((char*)b)); + return BString::Private::StringFromData(*(char**)a).ICompare( + BString::Private::StringFromData(*(char**)b)); } @@ -367,7 +367,7 @@ BStringList::Flatten(void* buf, ssize_t size) const if (size < FlattenedSize()) return B_NO_MEMORY; - + int32 count = CountStrings(); for (int32 i = 0; i < count; i++) { BString item = StringAt(i); @@ -403,7 +403,7 @@ BStringList::Unflatten(type_code code, const void* buffer, ssize_t size) } return B_OK; -} +} void