mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
[qfcc] Fix infinite loop in linker
This commit is contained in:
parent
8b6d05a4dd
commit
e93ca9d828
1 changed files with 5 additions and 6 deletions
|
@ -1122,13 +1122,12 @@ undefined_def (qfo_def_t *def)
|
|||
if (func->code < 0) {
|
||||
continue;
|
||||
}
|
||||
if ((pr_uint_t) func->code > reloc->offset) {
|
||||
continue;
|
||||
}
|
||||
if ((pr_uint_t) func->code <= reloc->offset) {
|
||||
if (!best || reloc->offset - func->code < best_dist) {
|
||||
best = func;
|
||||
best_dist = reloc->offset - func->code;
|
||||
}
|
||||
}
|
||||
func++;
|
||||
}
|
||||
line = work->lines + best->line_info;
|
||||
|
|
Loading…
Reference in a new issue