Ticket #2806: 20081006-nth_symbol.diff

File 20081006-nth_symbol.diff, 539 bytes (added by romain, 16 years ago)
  • elf.cpp

     
    18341835    // iterate through all the hash buckets until we've found the one
    18351836    for (i = 0; i < HASHTABSIZE(image); i++) {
    18361837        for (j = HASHBUCKETS(image)[i]; j != STN_UNDEF; j = HASHCHAINS(image)[j]) {
    1837             struct Elf32_Sym *symbol = &image->syms[i];
     1838            struct Elf32_Sym *symbol = &image->syms[j];
    18381839
    18391840            if (count == num) {
    18401841                strlcpy(nameBuffer, SYMNAME(image, symbol), *_nameLength);