We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e53b9d9 commit 17c6418Copy full SHA for 17c6418
src/msg.zig
@@ -73,7 +73,7 @@ pub const MsgBuffer = struct {
73
var msg_size: usize = undefined;
74
if (self.isEmpty()) {
75
// parse msg size metadata
76
- const size_pos = std.mem.indexOfScalar(u8, _input, ':').?;
+ const size_pos = std.mem.indexOfScalar(u8, _input, ':') orelse return error.InputWithoutSize;
77
const size_str = _input[0..size_pos];
78
msg_size = try std.fmt.parseInt(u32, size_str, 10);
79
_input = _input[size_pos + 1 ..];
0 commit comments