Skip to content

Commit

Permalink
fix operator precedence bug
Browse files Browse the repository at this point in the history
  • Loading branch information
randall77 committed Oct 2, 2017
1 parent 33b0e68 commit 19b8e0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gocore/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (p *Program) isPtr(a core.Address) bool {

// Find bit in bitmap. It goes backwards from the end.
// Each byte contains pointer/nonpointer bits for 4 words in its low nybble.
return p.proc.ReadUint8(p.bitmapEnd.Add(-off>>2-1))>>uint(off&3)&1 != 0
return p.proc.ReadUint8(p.bitmapEnd.Add(-(off>>2)-1))>>uint(off&3)&1 != 0
}

// FindObject finds the object containing a. Returns that object and the offset within
Expand Down

0 comments on commit 19b8e0d

Please sign in to comment.