Skip to content

Commit

Permalink
Fix bad examples for writeBits
Browse files Browse the repository at this point in the history
  • Loading branch information
kozross committed Jun 5, 2024
1 parent 60f3a1d commit 1afbef1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CIP-0122/CIP-0122.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,15 +674,15 @@ writeBits [0x00] [(5, True)] => [0x20]
writeBits [0xFF] [(5, False)] => [0xDF]
-- Larger indexes write backwards into the bytes from the end
writeBits [0xF4, 0xFF] [(10, True)] => [0xF0, 0xFF]
writeBits [0xF4, 0xFF] [(10, False)] => [0xF0, 0xFF]
-- Multiple items in a change list apply cumulatively
writeBits [0xF4, 0xFF] [(10, True), (1, False)] => [0xF0, 0xFD]
writeBits [0xF4, 0xFF] [(10, False), (1, False)] => [0xF0, 0xFD]
writeBits (writeBits [0xF4, 0xFF] [(10, True)]) [(1, False)] => [0xF0, 0xFD]
writeBits (writeBits [0xF4, 0xFF] [(10, False)]) [(1, False)] => [0xF0, 0xFD]
-- Order within a change list is unimportant among unique indexes
writeBits [0xF4, 0xFF] [(1, False), (10, True)] => [0xF0, 0xFD]
writeBits [0xF4, 0xFF] [(1, False), (10, False)] => [0xF0, 0xFD]
-- But _is_ important for identical indexes
writeBits [0x00, 0xFF] [(10, True), (10, False)] => [0x00, 0xFF]
Expand Down

0 comments on commit 1afbef1

Please sign in to comment.