summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/srmp6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/srmp6.cpp')
-rw-r--r--src/mame/drivers/srmp6.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mame/drivers/srmp6.cpp b/src/mame/drivers/srmp6.cpp
index df8257e30f7..67303b6704f 100644
--- a/src/mame/drivers/srmp6.cpp
+++ b/src/mame/drivers/srmp6.cpp
@@ -164,7 +164,7 @@ static inline u8 get_fade(int c, int f) // same as CPS3?
{
f &= 0x3f;
c = (f & 0x20) ? (c + (((0x1f - c) * (f & 0x1f)) / 0x1f)) : ((c * f) / 0x1f);
- c = std::max(0, std::min(0x1f, c));
+ c = std::clamp(c, 0, 0x1f);
}
return c;
}