From 0555803a4154edad44e4924a317f87c6ea675d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 6 Oct 2008 21:03:58 +0000 Subject: [PATCH] Applied patch by Romain, thanks!: * get_nth_symbol() did not correctly iterate over the symbol hash, causing it to return the same symbols more than once, and omit others. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27896 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/runtime_loader/elf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/runtime_loader/elf.cpp b/src/system/runtime_loader/elf.cpp index eb48ec3dc3..2328e6e849 100644 --- a/src/system/runtime_loader/elf.cpp +++ b/src/system/runtime_loader/elf.cpp @@ -1835,7 +1835,7 @@ get_nth_symbol(image_id imageID, int32 num, char *nameBuffer, // iterate through all the hash buckets until we've found the one for (i = 0; i < HASHTABSIZE(image); i++) { for (j = HASHBUCKETS(image)[i]; j != STN_UNDEF; j = HASHCHAINS(image)[j]) { - struct Elf32_Sym *symbol = &image->syms[i]; + struct Elf32_Sym *symbol = &image->syms[j]; if (count == num) { strlcpy(nameBuffer, SYMNAME(image, symbol), *_nameLength);