| ... | @@ -276,10 +276,9 @@ pub fn readEnumBig(reader: anytype, comptime E: type) !E { | ... | @@ -276,10 +276,9 @@ pub fn readEnumBig(reader: anytype, comptime E: type) !E { |
| 276 | } | 276 | } |
| 277 | | 277 | |
| 278 | pub fn readExpected(reader: anytype, expected: []const u8) !bool { | 278 | pub fn readExpected(reader: anytype, expected: []const u8) !bool { |
| 279 | for (expected, 0..) |item, i| { | 279 | for (expected) |item| { |
| 280 | const actual = try reader.readByte(); | 280 | const actual = try reader.readByte(); |
| 281 | if (actual != item) { | 281 | if (actual != item) { |
| 282 | std.log.err("expected '{d}' at index {d}, found: '{d}'", .{ item, i, actual }); | | |
| 283 | return false; | 282 | return false; |
| 284 | } | 283 | } |
| 285 | } | 284 | } |