Skip to content

Commit

Permalink
Urgent fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Rasquier committed Dec 15, 2017
1 parent 3632f11 commit 7f38dcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions asm/classreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -1963,17 +1963,17 @@ func (c ClassReader) readByte(offset int) byte {

func (c ClassReader) readUnsignedShort(offset int) int {
b := c.b
return int(((b[offset] & 0xFF) << 8) | (b[offset+1] & 0xFF))
return (int(b[offset]&0xFF) << 8) | int(b[offset+1]&0xFF)
}

func (c ClassReader) readShort(offset int) int16 {
b := c.b
return int16((((b[offset] & 0xFF) << 8) | (b[offset+1] & 0xFF)))
return ((int16(b[offset]&0xFF) << 8) | int16(b[offset+1]&0xFF))
}

func (c ClassReader) readInt(offset int) int {
b := c.b
return int(((b[offset] & 0xFF) << 24) | ((b[offset+1] & 0xFF) << 16) | ((b[offset+2] & 0xFF) << 8) | (b[offset+3] & 0xFF))
return int((b[offset]&0xFF))<<24 | int((b[offset+1]&0xFF))<<16 | int((b[offset+2]&0xFF))<<8 | int(b[offset+3]&0xFF)
}

func (c ClassReader) readLong(offset int) int64 {
Expand Down

0 comments on commit 7f38dcd

Please sign in to comment.