Fix for UBSAN left shift of negative number error in SexyFilter2

This commit is contained in:
harry 2023-02-09 20:06:18 -05:00
parent 66f35e1074
commit 18f09c8e76
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ void SexyFilter2(int32 *in, int32 count)
while(count--)
{
int64 dropcurrent;
dropcurrent=((*in<<16)-acc)>>3;
dropcurrent=( int32(uint32(*in)<<16)-acc)>>3;
acc+=dropcurrent;
*in=acc>>16;