diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-12-08 14:03:41 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-12-08 14:03:41 (GMT) |
commit | 9e3c072316b1183c256595f394f3ca22f2d2b66e (patch) | |
tree | b0cca70228482652b998a6303d6f6d34a009a190 /src/format/symbol.c | |
parent | 3ad8e821ec6a6e8408a9fc737b385aa863c67123 (diff) |
Compared symbols using their location only to prevent duplicated symbols.
Diffstat (limited to 'src/format/symbol.c')
-rw-r--r-- | src/format/symbol.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/format/symbol.c b/src/format/symbol.c index 899740a..22403c5 100644 --- a/src/format/symbol.c +++ b/src/format/symbol.c @@ -237,8 +237,13 @@ GBinSymbol *g_binary_symbol_new(const mrange_t *range, SymbolType type) int g_binary_symbol_cmp(const GBinSymbol * const *a, const GBinSymbol * const *b) { int result; /* Bilan à retourner */ + const mrange_t *range_a; /* Emplacement du symbole A */ + const mrange_t *range_b; /* Emplacement du symbole B */ - result = cmp_mrange(&(*a)->range, &(*b)->range); + range_a = &(*a)->range; + range_b = &(*b)->range; + + result = cmp_vmpa(get_mrange_addr(range_a), get_mrange_addr(range_b)); return result; |