Commit 055dfc20 authored by Russ Cox's avatar Russ Cox

liblink: fix precedence bug in pcdata comparison

As written, the ! applies before the &1.
This would crash writing out missing pcdata tables
if we ever used non-contiguous IDs in a function.
We don't, but fix anyway.

LGTM=iant, minux
R=minux, iant
CC=golang-codereviews
https://golang.org/cl/117810047
parent 0c6b55e7
......@@ -279,7 +279,7 @@ linkpcln(Link *ctxt, LSym *cursym)
}
// pcdata.
for(i=0; i<npcdata; i++) {
if(!(havepc[i/32]>>(i%32))&1)
if(((havepc[i/32]>>(i%32))&1) == 0)
continue;
funcpctab(ctxt, &pcln->pcdata[i], cursym, "pctopcdata", pctopcdata, (void*)(uintptr)i);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment