plan9port

[fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port # fast
git clone https://src.adamsgaard.dk/plan9port.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit 62c277efe84efc5c90ad6578a55b4eaa9a22827c
parent 86fa0d22778563378cd6fb422014aa37aa762d95
Author: rsc <devnull@localhost>
Date:   Tue, 20 Apr 2004 04:33:53 +0000

fix stupid bug in findsym

Diffstat:
Msrc/libmach/sym.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libmach/sym.c b/src/libmach/sym.c @@ -295,7 +295,7 @@ findsym(Loc loc, uint class, Symbol *s) l.addr = loc.addr - p->base; if((t = ffindsym(p, l, CANY)) != nil){ d = l.addr - t->loc.addr; - if(d < 4096) + if(0 <= d && d < 4096) if(best == nil || d < bestd){ best = t; bestp = p;