diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-10-19 22:34:33 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-10-19 22:34:33 +0200 |
commit | 29f60c7e2cd5eddbf056c55f413a1fe2ebdd3ce3 (patch) | |
tree | 11eee819394326e6f1f183bdb8612a2e70d6e9be /plugins/gme | |
parent | 956cb324c94d4062408d73ee8bf005b9e6ea3ec2 (diff) |
gme: fixed crash and valgrind error
Diffstat (limited to 'plugins/gme')
-rw-r--r-- | plugins/gme/game-music-emu-0.6pre/gme/Ay_Core.cpp | 1 | ||||
-rw-r--r-- | plugins/gme/game-music-emu-0.6pre/gme/Ay_Emu.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/plugins/gme/game-music-emu-0.6pre/gme/Ay_Core.cpp b/plugins/gme/game-music-emu-0.6pre/gme/Ay_Core.cpp index 4c56f56a..4e0609ee 100644 --- a/plugins/gme/game-music-emu-0.6pre/gme/Ay_Core.cpp +++ b/plugins/gme/game-music-emu-0.6pre/gme/Ay_Core.cpp @@ -23,6 +23,7 @@ inline void Ay_Core::disable_beeper() Ay_Core::Ay_Core() { + cpc_mode = false; beeper_output = NULL; disable_beeper(); } diff --git a/plugins/gme/game-music-emu-0.6pre/gme/Ay_Emu.cpp b/plugins/gme/game-music-emu-0.6pre/gme/Ay_Emu.cpp index fafbc4ce..3266c305 100644 --- a/plugins/gme/game-music-emu-0.6pre/gme/Ay_Emu.cpp +++ b/plugins/gme/game-music-emu-0.6pre/gme/Ay_Emu.cpp @@ -222,7 +222,11 @@ blargg_err_t Ay_Emu::start_track_( int track ) len = core.mem_size - addr;
}
check( len );
+ printf ("blocks: %d\n", blocks);
byte const* in = get_data( file, blocks, 0 ); blocks += 2;
+ if (!in) {
+ break;
+ }
if ( len > (unsigned) (file.end - in) )
{
set_warning( "File data missing" );
|