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:
parent
eaa3a999ac
commit
0555803a41
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user