Skip to content

Commit

Permalink
Use const literal for byte index
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Jan 8, 2025
1 parent 7a45ff5 commit cc53c8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/mysql/binlog_event_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (ev binlogEvent) Length() uint32 {
// NextPosition returns the nextPosition field from the header
func (ev binlogEvent) NextPosition() uint64 {
// Only 4 bytes are used for the next_position field in the header.
return uint64(binary.LittleEndian.Uint32(ev.Bytes()[13 : 13+4]))
return uint64(binary.LittleEndian.Uint32(ev.Bytes()[13:17]))
}

// IsFormatDescription implements BinlogEvent.IsFormatDescription().
Expand Down

0 comments on commit cc53c8c

Please sign in to comment.