From: <sv...@op...> - 2025-02-15 15:45:58
|
Author: manx Date: Sat Feb 15 16:45:42 2025 New Revision: 22876 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22876 Log: Merged revision(s) 22874 from trunk/OpenMPT: [Fix] stb_vorbis: Fix Clang -Wtautological-compare warning and related Undefined Behaviour. Apply <https://github.com/nothings/stb/pull/1746>. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/include/stb_vorbis/OpenMPT.txt branches/OpenMPT-1.30/include/stb_vorbis/stb_vorbis.c Modified: branches/OpenMPT-1.30/include/stb_vorbis/OpenMPT.txt ============================================================================== --- branches/OpenMPT-1.30/include/stb_vorbis/OpenMPT.txt Sat Feb 15 16:45:00 2025 (r22875) +++ branches/OpenMPT-1.30/include/stb_vorbis/OpenMPT.txt Sat Feb 15 16:45:42 2025 (r22876) @@ -3,6 +3,7 @@ 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. @@ -10,4 +11,3 @@ For building, premake is used to generate Visual Studio project files. See ../build/premake/ for details. - Modified: branches/OpenMPT-1.30/include/stb_vorbis/stb_vorbis.c ============================================================================== --- branches/OpenMPT-1.30/include/stb_vorbis/stb_vorbis.c Sat Feb 15 16:45:00 2025 (r22875) +++ branches/OpenMPT-1.30/include/stb_vorbis/stb_vorbis.c Sat Feb 15 16:45:42 2025 (r22876) @@ -1410,7 +1410,7 @@ #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; |