mirror of
https://git.robbyzambito.me/zits
synced 2026-02-04 19:54:48 +00:00
Fix sub parse bug
Was accidentally consuming one more byte than I was expecting when reaching the end of the second term. This was causing the parser to work properly in the case that a queue group was specified, but failing and consuming the next message (usually a PING) as the SID.
This commit is contained in:
@@ -260,9 +260,10 @@ pub const Message = union(MessageType) {
|
||||
} else |err| return err;
|
||||
|
||||
var acc: std.ArrayList(u8) = try .initCapacity(alloc, 32);
|
||||
while (in.takeByte()) |byte| {
|
||||
while (in.peekByte()) |byte| {
|
||||
if (std.ascii.isWhitespace(byte)) break;
|
||||
try acc.append(alloc, byte);
|
||||
in.toss(1);
|
||||
} else |err| return err;
|
||||
|
||||
break :blk try acc.toOwnedSlice(alloc);
|
||||
|
||||
Reference in New Issue
Block a user