Skip to content

Commit

Permalink
Merged revision(s) 22874 from trunk/OpenMPT:
Browse files Browse the repository at this point in the history
[Fix] stb_vorbis: Fix Clang -Wtautological-compare warning and related Undefined Behaviour. Apply <nothings/stb#1746>.
........


git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.29@22877 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
manxorist committed Feb 15, 2025
1 parent 83c36ae commit 099f7a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/stb_vorbis/OpenMPT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ https://github.com/nothings/stb/blob/master/stb_vorbis.c v1.22
commit 5a0bb8b1c1b1ca3f4e2485f4114c1c8ea021b781 (2021-07-12)

Modifications:
* <https://github.com/nothings/stb/pull/1746> has been applied.
* Use of alloca has been replaced with malloc, as alloca is not in C99 and
fails to compile.
* Macro redefinition of alloca with mingw-w64 has been fixed.
* Macro redefinition of STB_VORBIS_NO_STDIO has been fixed.

For building, premake is used to generate Visual Studio project files.
See ../build/premake/ for details.

2 changes: 1 addition & 1 deletion include/stb_vorbis/stb_vorbis.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ 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) {
if (loc >= f->stream_len) {
f->stream = f->stream_end;
f->eof = 1;
return 0;
Expand Down

0 comments on commit 099f7a3

Please sign in to comment.