mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-13 22:32:32 +00:00
Fix stb_vorbis failing to load .ogg files without comments
fix taken from https://github.com/nothings/stb/pull/1095
This commit is contained in:
parent
c1c8de214a
commit
1ae268a20e
1 changed files with 1 additions and 1 deletions
|
@ -3643,7 +3643,7 @@ static int start_decoder(vorb *f)
|
|||
//user comments
|
||||
f->comment_list_length = get32_packet(f);
|
||||
f->comment_list = (char**)setup_malloc(f, sizeof(char*) * (f->comment_list_length));
|
||||
if (f->comment_list == NULL) return error(f, VORBIS_outofmem);
|
||||
if (f->comment_list == NULL && f->comment_list_length > 0) return error(f, VORBIS_outofmem);
|
||||
|
||||
for(i=0; i < f->comment_list_length; ++i) {
|
||||
len = get32_packet(f);
|
||||
|
|
Loading…
Reference in a new issue