plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

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;