From d07f28aec5c640315ea70a2aae3196efb02d5e49 Mon Sep 17 00:00:00 2001 From: Waldemar Pawlaszek Date: Tue, 22 Feb 2022 21:12:10 +0100 Subject: [PATCH] Compilation error fix --- src/engine/platform/sound/lynx/Mikey.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/platform/sound/lynx/Mikey.cpp b/src/engine/platform/sound/lynx/Mikey.cpp index dadbe37e..2f3b23ed 100644 --- a/src/engine/platform/sound/lynx/Mikey.cpp +++ b/src/engine/platform/sound/lynx/Mikey.cpp @@ -129,14 +129,14 @@ private: int64_t scaleDiff( int64_t older, int64_t newer ) const { - int64_t const mask = ~0 << ( mAudShift + 4 ); + int64_t const mask = (int64_t)( ~0ull << ( mAudShift + 4 ) ); return ( ( newer & mask ) - ( older & mask ) ) >> ( mAudShift + 4 ); } void updateValue( int64_t tick ) { if ( mEnableCount ) - mValue = (uint8_t)std::max( 0ll, mValue - scaleDiff( mValueUpdateTick, tick ) ); + mValue = (uint8_t)std::max( (int64_t)0, mValue - scaleDiff( mValueUpdateTick, tick ) ); mValueUpdateTick = tick; }