| ... | @@ -1354,7 +1354,7 @@ fn computeRedraw(io: Io, serialized_buffer: *Serialized.Buffer) !struct { []u8, | ... | @@ -1354,7 +1354,7 @@ fn computeRedraw(io: Io, serialized_buffer: *Serialized.Buffer) !struct { []u8, |
| 1354 | buf[i..][0..progress_pulsing.len].* = progress_pulsing.*; | 1354 | buf[i..][0..progress_pulsing.len].* = progress_pulsing.*; |
| 1355 | i += progress_pulsing.len; | 1355 | i += progress_pulsing.len; |
| 1356 | } else { | 1356 | } else { |
| 1357 | const percent = completed_items * 100 / estimated_total; | 1357 | const percent = @as(u64, completed_items) * 100 / estimated_total; |
| 1358 | if (std.fmt.bufPrint(buf[i..], @"progress_normal {d}", .{percent})) |b| { | 1358 | if (std.fmt.bufPrint(buf[i..], @"progress_normal {d}", .{percent})) |b| { |
| 1359 | i += b.len; | 1359 | i += b.len; |
| 1360 | } else |_| {} | 1360 | } else |_| {} |
| ... | @@ -1373,7 +1373,7 @@ fn computeRedraw(io: Io, serialized_buffer: *Serialized.Buffer) !struct { []u8, | ... | @@ -1373,7 +1373,7 @@ fn computeRedraw(io: Io, serialized_buffer: *Serialized.Buffer) !struct { []u8, |
| 1373 | buf[i..][0..progress_pulsing_error.len].* = progress_pulsing_error.*; | 1373 | buf[i..][0..progress_pulsing_error.len].* = progress_pulsing_error.*; |
| 1374 | i += progress_pulsing_error.len; | 1374 | i += progress_pulsing_error.len; |
| 1375 | } else { | 1375 | } else { |
| 1376 | const percent = completed_items * 100 / estimated_total; | 1376 | const percent = @as(u64, completed_items) * 100 / estimated_total; |
| 1377 | if (std.fmt.bufPrint(buf[i..], @"progress_error {d}", .{percent})) |b| { | 1377 | if (std.fmt.bufPrint(buf[i..], @"progress_error {d}", .{percent})) |b| { |
| 1378 | i += b.len; | 1378 | i += b.len; |
| 1379 | } else |_| {} | 1379 | } else |_| {} |