-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
ran into it while trying this library for today's aoc:
import binaryparse, streams
block:
let test1 = newStringStream("\xD2\xFE\x28")
createParser(packet):
u3: version
u3: typeId
var data = packet.get(test1)
dump data
outputs:
data = (version: 6, typeId: 7)
but typeId should be 4.
For comparison binarylang has the correct output:
import binarylang
block:
let test1 = newStringBitStream("\xD2\xFE\x28")
struct(packet):
u3: version
u3: typeId
var data = packet.get(test1)
# data is an object without a $ proc defined
echo data.version
echo data.typeId
outputs:
6
4
Metadata
Metadata
Assignees
Labels
No labels