Fix off-by-one in binfmt reader

This commit is contained in:
Yorhel 2024-08-18 08:38:57 +02:00
parent e324804cdd
commit ca46c7241f

View file

@ -118,7 +118,7 @@ const CborReader = struct {
buf: []const u8,
fn head(r: *CborReader) CborVal {
if (r.buf.len < 0) die();
if (r.buf.len < 1) die();
var v = CborVal{
.rd = r,
.major = @enumFromInt(r.buf[0] >> 5),