Skip to content

Commit

Permalink
Fix coverity sign extension warning
Browse files Browse the repository at this point in the history
Part of issue #2996
  • Loading branch information
weirddan455 authored and kcgen committed Oct 14, 2023
1 parent 50f6d57 commit 723c64f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hardware/vga_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1840,8 +1840,8 @@ static Fraction calc_pixel_aspect_from_dimensions(const uint16_t width,
const bool double_width,
const bool double_height)
{
const auto storage_aspect_ratio = Fraction(width * (double_width ? 2 : 1),
height * (double_height ? 2 : 1));
const auto storage_aspect_ratio = Fraction(static_cast<int64_t>(width) * (double_width ? 2 : 1),
static_cast<int64_t>(height) * (double_height ? 2 : 1));

return display_aspect_ratio / storage_aspect_ratio;
}
Expand Down

0 comments on commit 723c64f

Please sign in to comment.