diff options
author | Wohlstand <admin@wohlnet.ru> | 2016-12-07 14:29:08 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2016-12-07 14:29:08 +0300 |
commit | b39cca1c30b0424a567d3826a8038946404cf0a6 (patch) | |
tree | 47ffce8cb33392c3a27a41c4a7c21698f0b208ce /src/nukedopl3.h | |
parent | fd24385f027c06e16ea2edda6a74ab424bb0290e (diff) | |
download | libADLMIDI-b39cca1c30b0424a567d3826a8038946404cf0a6.tar.gz libADLMIDI-b39cca1c30b0424a567d3826a8038946404cf0a6.tar.bz2 libADLMIDI-b39cca1c30b0424a567d3826a8038946404cf0a6.zip |
Fixed crash in the DosBox version
(because after std::vector's resize, contents is uninitialized, Valgrind has been confirmed that)
Diffstat (limited to 'src/nukedopl3.h')
-rw-r--r-- | src/nukedopl3.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nukedopl3.h b/src/nukedopl3.h index e7f05ef..ea44de9 100644 --- a/src/nukedopl3.h +++ b/src/nukedopl3.h @@ -51,13 +51,13 @@ typedef struct _opl3_slot opl3_slot; typedef struct _opl3_channel opl3_channel; typedef struct _opl3_chip opl3_chip; -#pragma pack(1) struct _opl3_slot { opl3_channel *channel; opl3_chip *chip; Bit16s out; Bit16s fbmod; + Bit8u ___padding[4]; Bit16s *mod; Bit16s prout; Bit16s eg_rout; @@ -66,6 +66,7 @@ struct _opl3_slot Bit8u eg_gen; Bit8u eg_rate; Bit8u eg_ksl; + Bit8u ___padding2[6]; Bit8u *trem; Bit8u reg_vib; Bit8u reg_type; @@ -81,6 +82,7 @@ struct _opl3_slot Bit8u key; Bit32u pg_phase; Bit32u timer; + Bit8u ___padding3[4]; }; struct _opl3_channel @@ -90,13 +92,16 @@ struct _opl3_channel opl3_chip *chip; Bit16s *out[4]; Bit8u chtype; + Bit8u ___padding[1]; Bit16u f_num; Bit8u block; Bit8u fb; Bit8u con; Bit8u alg; Bit8u ksv; + Bit8u ___padding2[1]; Bit16u cha, chb; + Bit8u ___padding3[2]; }; typedef struct _opl3_writebuf @@ -104,8 +109,8 @@ typedef struct _opl3_writebuf Bit64u time; Bit16u reg; Bit8u data; + Bit8u ___padding[5]; } opl3_writebuf; -#pragma pack(0) struct _opl3_chip { |