mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-16 08:04:07 +00:00
Fix #5887
By cherry picking unmerged fix in upstream https://github.com/nothings/stb/issues/1745.
This commit is contained in:
6
vendor/stb/src/stb_vorbis.c
vendored
6
vendor/stb/src/stb_vorbis.c
vendored
@@ -1401,7 +1401,11 @@ static int set_file_offset(stb_vorbis *f, unsigned int loc)
|
||||
#endif
|
||||
f->eof = 0;
|
||||
if (USE_MEMORY(f)) {
|
||||
if (f->stream_start + loc >= f->stream_end || f->stream_start + loc < f->stream_start) {
|
||||
// Known problem upstream: https://github.com/nothings/stb/issues/1745
|
||||
// But pull request hasn't been merged: https://github.com/nothings/stb/pull/1746
|
||||
// So we cherry pick it.
|
||||
// if (f->stream_start + loc >= f->stream_end || f->stream_start + loc < f->stream_start) {
|
||||
if (loc >= f->stream_len) {
|
||||
f->stream = f->stream_end;
|
||||
f->eof = 1;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user