Skip to content

Commit 0206d46

Browse files
rvolosatovslukewagner
authored andcommitted
special-case s8 and u8 in Binary.md
Special case `s8` and `u8` to ensure that exactly 1 byte is used to represent values of those types #336 (comment) Signed-off-by: Roman Volosatovs <[email protected]>
1 parent 4480daf commit 0206d46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

design/mvp/Binary.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ Notes:
358358
value ::= t:<valtype> v:<val(t)> => (value t v)
359359
val(bool) ::= 0x00 => false
360360
| 0x01 => true
361-
val(u8) ::= v:<core:u8> => v
362-
val(s8) ::= v:<core:s8> => v
361+
val(u8) ::= v:<core:byte> => v
362+
val(s8) ::= v:<core:byte> => v if v < 128 else (v - 256)
363363
val(s16) ::= v:<core:s16> => v
364364
val(u16) ::= v:<core:u16> => v
365365
val(s32) ::= v:<core:s32> => v

0 commit comments

Comments
 (0)