diff --git a/src/render/rt64_render_target.cpp b/src/render/rt64_render_target.cpp index e62bb48..a23da72 100644 --- a/src/render/rt64_render_target.cpp +++ b/src/render/rt64_render_target.cpp @@ -424,7 +424,7 @@ namespace RT64 { scaledWidth = uint32_t(expandedColorWidthClamped); scaledHeight = uint32_t(colorHeightClamped); - const long expandedPixels = std::labs(scaledWidth - nativeColorWidthClamped) / 2; + const long expandedPixels = std::labs(long(scaledWidth) - nativeColorWidthClamped) / 2; const long nativeAlignment = std::max(lround(resolutionScale.y), 1L); misalignmentX = (nativeAlignment - (expandedPixels % nativeAlignment)) % nativeAlignment; }