diff options
Diffstat (limited to 'packet_reader')
-rw-r--r-- | packet_reader/packet_reader.ha | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packet_reader/packet_reader.ha b/packet_reader/packet_reader.ha index e4cbcf2..6d8c315 100644 --- a/packet_reader/packet_reader.ha +++ b/packet_reader/packet_reader.ha @@ -91,8 +91,10 @@ export fn next(pr: *packet_reader) (packet | done | error) = { const payload = packet_bytes[8..]; switch (ty) { case packet_type::DRAW_OP => - const op = drawing::deser_op(payload); - return op: packet_drawop; + match (drawing::deser_op(payload)) { + case let o: drawing::op => return o; + case drawing::deser_fail => return "deser fail": error; + }; case packet_type::SEND_CHUNK => // return value is BORROWED from the BUFFER const pos_bytes = payload[0..8]; |