mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +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) {
|
if (func->code < 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((pr_uint_t) func->code > reloc->offset) {
|
if ((pr_uint_t) func->code <= reloc->offset) {
|
||||||
continue;
|
if (!best || reloc->offset - func->code < best_dist) {
|
||||||
}
|
best = func;
|
||||||
if (!best || reloc->offset - func->code < best_dist) {
|
best_dist = reloc->offset - func->code;
|
||||||
best = func;
|
}
|
||||||
best_dist = reloc->offset - func->code;
|
|
||||||
}
|
}
|
||||||
func++;
|
func++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue