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
This commit is contained in:
Axel Dörfler 2008-10-06 21:03:58 +00:00
parent eaa3a999ac
commit 0555803a41

View File

@ -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);