Skip to content

Commit 60a913b

Browse files
committed
fix crash bug in Pong
1 parent 1e20e47 commit 60a913b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PingPong.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ struct MySquareButton_Reverse : MySquareButton2
161161
if( !mymodule->m_bReverseState )
162162
{
163163
delay = mymodule->params[ PingPong::PARAM_DELAYL ].value * MAC_DELAY_SECONDS * gSampleRate;
164-
mymodule->m_DelayOut[ L ] = ( mymodule->m_DelayIn - (int)delay ) & 0xFFFFF;
164+
mymodule->m_DelayOut[ L ] = ( mymodule->m_DelayIn - (int)delay ) & 0x7FFFF;
165165

166166
delay = mymodule->params[ PingPong::PARAM_DELAYR ].value * MAC_DELAY_SECONDS * gSampleRate;
167-
mymodule->m_DelayOut[ R ] = ( mymodule->m_DelayIn - (int)delay ) & 0xFFFFF;
167+
mymodule->m_DelayOut[ R ] = ( mymodule->m_DelayIn - (int)delay ) & 0x7FFFF;
168168
}
169169
}
170170

0 commit comments

Comments
 (0)