Fix undefined behaviour due to shifting signed in snd_mem.c

This commit is contained in:
Dominic Fandrey authored and Zack Middleton committed 2018-04-08 21:41:26 -05:00
1 parent 4ea0eebfe5
commit a494edeb94
1 file changed
+1 -1
+1 -1
View File
@@ -141,7 +141,7 @@ static int ResampleSfx( sfx_t *sfx, int channels, int inrate, int inwidth, int s
if( inwidth == 2 ) {
sample = ( ((short *)data)[srcsample+j] );
} else {
sample = (int)( (unsigned char)(data[srcsample+j]) - 128) << 8;
sample = (unsigned int)( (unsigned char)(data[srcsample+j]) - 128) << 8;
}
part = (i*channels+j)&(SND_CHUNK_SIZE-1);
if (part == 0) {