mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 23:52:22 +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,12 +1122,11 @@ undefined_def (qfo_def_t *def)
|
|||
if (func->code < 0) {
|
||||
continue;
|
||||
}
|
||||
if ((pr_uint_t) func->code > reloc->offset) {
|
||||
continue;
|
||||
}
|
||||
if (!best || reloc->offset - func->code < best_dist) {
|
||||
best = func;
|
||||
best_dist = reloc->offset - func->code;
|
||||
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++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue