From 62c277efe84efc5c90ad6578a55b4eaa9a22827c Mon Sep 17 00:00:00 2001 From: rsc Date: Tue, 20 Apr 2004 04:33:53 +0000 Subject: fix stupid bug in findsym --- src/libmach/sym.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libmach/sym.c b/src/libmach/sym.c index 7953019b..8347630c 100644 --- 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; -- cgit v1.2.3