summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2024-03-18 02:00:10 +0100
committer hap <happppp@users.noreply.github.com>2024-03-18 02:04:44 +0100
commitf966e52e6e4427f3134c281d5a9bf428125a79a9 (patch)
tree0cd7e487363be9db23a90c62b10cca5ec7d94c5a
parent21fac5f0aab11267433216be67c9bc20ceecb03e (diff)
rendlay: fix off-by-1 error with alpha blended disk element
-rw-r--r--src/emu/rendlay.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp
index 7dc75efb130..c6e053fc713 100644
--- a/src/emu/rendlay.cpp
+++ b/src/emu/rendlay.cpp
@@ -2298,17 +2298,13 @@ public:
if ((x >= minfill) && (x <= maxfill))
{
if (255 <= a)
- {
dst = std::fill_n(dst, maxfill - x + 1, f);
- x = maxfill;
- }
else
- {
while (x++ <= maxfill)
alpha_blend(*dst++, a, r, g, b, inva);
- --x;
- }
+
--dst;
+ x = maxfill;
}
else
{
@@ -2410,17 +2406,13 @@ public:
if ((x >= minfill) && (x <= maxfill))
{
if (255 <= a)
- {
dst = std::fill_n(dst, maxfill - x + 1, f);
- x = maxfill;
- }
else
- {
while (x++ <= maxfill)
alpha_blend(*dst++, a, r, g, b, inva);
- --x;
- }
+
--dst;
+ x = maxfill;
}
else
{