diff --git a/Quake/snd_mix.c b/Quake/snd_mix.c index 4e28039a..d1e1292c 100644 --- a/Quake/snd_mix.c +++ b/Quake/snd_mix.c @@ -253,6 +253,7 @@ void SND_InitScaletable (void) { scale = i * 8 * 256 * sfxvolume.value; for (j = 0; j < 256; j++) + { /* When compiling with gcc-4.1.0 at optimisations O1 and higher, the tricky signed char type conversion is not guaranteed. Therefore we explicity calculate the signed @@ -261,6 +262,7 @@ void SND_InitScaletable (void) */ // snd_scaletable[i][j] = ((signed char)j) * scale; snd_scaletable[i][j] = ((j < 128) ? j : j - 0xff) * scale; + } } } @@ -279,7 +281,7 @@ static void SND_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count) lscale = snd_scaletable[ch->leftvol >> 3]; rscale = snd_scaletable[ch->rightvol >> 3]; - sfx = (unsigned char *) ((signed char *)sc->data + ch->pos); + sfx = (unsigned char *)sc->data + ch->pos; for (i = 0; i < count; i++) {