Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed Jun 24, 2024
1 parent f931abd commit 597765e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/debezium/decimal.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ func EncodeDecimal(value string, scale uint16) ([]byte, error) {
// Convert to two's complement if the number is negative

if data[0] > 127 {
// Prepend an empty byte if the first bit is already set.
// If the first bit is already set then it is a significant bit and we need to prepend an additional byte
// that will be used to indicate whether the number is positive or negative.
data = slices.Concat([]byte{0}, data)
}

Expand Down

0 comments on commit 597765e

Please sign in to comment.