diff options
author | Johannes Schickel | 2009-05-13 17:29:48 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-05-13 17:29:48 +0000 |
commit | a866e90342b8797b8fa28fdbcca975daed3f5c05 (patch) | |
tree | a7860b4121ab68580007f55a2cfb63e27a9e2ac2 /sound/softsynth/opl | |
parent | 636776cf441cc03502497ca6a0a3e74f2b2daa2c (diff) | |
download | scummvm-rg350-a866e90342b8797b8fa28fdbcca975daed3f5c05.tar.gz scummvm-rg350-a866e90342b8797b8fa28fdbcca975daed3f5c05.tar.bz2 scummvm-rg350-a866e90342b8797b8fa28fdbcca975daed3f5c05.zip |
Make g++ 4.4 happy (warning about out of bounds access).
svn-id: r40526
Diffstat (limited to 'sound/softsynth/opl')
-rw-r--r-- | sound/softsynth/opl/opl_impl.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/softsynth/opl/opl_impl.h b/sound/softsynth/opl/opl_impl.h index 4ea8793965..c5ef87ce3c 100644 --- a/sound/softsynth/opl/opl_impl.h +++ b/sound/softsynth/opl/opl_impl.h @@ -632,7 +632,11 @@ void adlib_write(Bitu idx, Bit8u val) { int num = idx&7; Bitu base = (idx-ARC_TVS_KSR_MUL)&0xff; if ((num<6) && (base<22)) { +#if defined(OPLTYPE_IS_OPL3) Bitu modop = regbase2modop[second_set?(base+22):base]; +#else + Bitu modop = regbase2modop[base]; +#endif Bitu regbase = base+second_set; Bitu chanbase = second_set?(modop-18+ARC_SECONDSET):modop; @@ -662,7 +666,11 @@ void adlib_write(Bitu idx, Bit8u val) { int num = idx&7; Bitu base = (idx-ARC_KSL_OUTLEV)&0xff; if ((num<6) && (base<22)) { +#if defined(OPLTYPE_IS_OPL3) Bitu modop = regbase2modop[second_set?(base+22):base]; +#else + Bitu modop = regbase2modop[base]; +#endif Bitu chanbase = second_set?(modop-18+ARC_SECONDSET):modop; // change frequency calculations of this operator as |