mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-24 19:00:23 +08:00
output: outmac64 -- Fix the case when first hit matches the symbol
In case if we're looking up for a symbol and it's first one in symbol table we might endup with error because of using GE here (78f477b35f) ending cycle with @nearest = NULL. http://bugzilla.nasm.us/show_bug.cgi?id=3392306 Reprted-by: Benjamin Randazzo <benjamin@linuxcrashing.org> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
1f0cb0f2c1
commit
4920a03243
@ -304,7 +304,7 @@ static struct symbol *get_closest_section_symbol_by_offset(uint8_t fileindex, in
|
||||
|
||||
for (sym = syms; sym; sym = sym->next) {
|
||||
if ((sym->sect != NO_SECT) && (sym->sect == fileindex)) {
|
||||
if ((int64_t)sym->value >= offset)
|
||||
if ((int64_t)sym->value > offset)
|
||||
break;
|
||||
nearest = sym;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user