libgme / game-music-emu

Blargg's video game music emulation library, which allows audio applications to easily add playback support for the music of many classic video game consoles.
GNU Lesser General Public License v2.1
59 stars 12 forks source link

Blip_Buffer: replace assert with a check #91

Closed tguillem closed 2 months ago

tguillem commented 2 months ago

assert() may be disabled and you don't want to abort a whole process in case of a parsing issue. So check the offset from samples_avail(), that will return 0 (EOF) in case of a out of bounds read.

Wohlstand commented 2 months ago

Good catch!