fix(DurFile): fix errors after rebase

This commit is contained in:
Titanium Brain 2026-05-09 17:24:53 +01:00
commit a38fa6b2dc

View file

@ -539,13 +539,13 @@ fn draw(self: *DurFile) void {
const current_frame = self.dur_movie.frames.items[self.frames];
// y is used as an iterator in the durformat, while cell_y gives us the correct placement for the cell (same for x)
for (0..@intCast(self.dur_movie.lines.?)) |y| {
for (0..@intCast(self.dur_movie.lines)) |y| {
const y_offset_i = @as(i32, @intCast(y)) + self.start_pos[VEC_Y];
const cell_y: u32 = if (y_offset_i >= 0) @intCast(y_offset_i) else continue;
var iter = std.unicode.Utf8View.initUnchecked(current_frame.contents[y]).iterator();
for (0..@intCast(self.dur_movie.columns.?)) |x| {
for (0..@intCast(self.dur_movie.columns)) |x| {
const x_offset_i = @as(i32, @intCast(x)) + self.start_pos[VEC_X];
const cell_x: u32 = if (x_offset_i >= 0) @intCast(x_offset_i) else {
_ = iter.nextCodepoint().?;