Skip to content

Commit

Permalink
fix(fs): invalid assert removed
Browse files Browse the repository at this point in the history
  • Loading branch information
mookums committed Dec 24, 2024
1 parent 9d89c94 commit c185704
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/http/router/fs_dir.zig
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,11 @@ pub const FsDir = struct {
}
};

const length_as_usize: usize = @intCast(length);
provision.rd_offset += length_as_usize;
provision.current_length += length_as_usize;
provision.rd_offset += length;
provision.current_length += length;
log.debug("current offset: {d} | fd: {}", .{ provision.rd_offset, provision.fd });

assert(provision.rd_offset <= length_as_usize);
assert(provision.current_length <= provision.buffer.len);

if (provision.current_length == provision.buffer.len) {
return try provision.context.send_then(
provision.buffer[0..provision.current_length],
Expand Down

0 comments on commit c185704

Please sign in to comment.