Skip to content

Commit

Permalink
Further correction to the formula
Browse files Browse the repository at this point in the history
  • Loading branch information
peternewman committed Mar 19, 2021
1 parent 4921c45 commit ee0d744
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osc/osc.go
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ func writePaddedString(str string, buf *bytes.Buffer) (int, error) {
// padBytesNeeded determines how many bytes are needed to fill up to the next 4
// byte length.
func padBytesNeeded(elementLen int) int {
return -(-elementLen%4)
return ((4 - elementLen) % 4)
}

////
Expand Down

0 comments on commit ee0d744

Please sign in to comment.