From f887fbb640caa68de95e9d2c4cd4b81c01140ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= Date: Sat, 15 Feb 2025 16:25:11 +0100 Subject: [PATCH] stb_vorbis: Fix Clang -Wtautological-compare warning and related Undefined Behaviour. Fixes . --- stb_vorbis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_vorbis.c b/stb_vorbis.c index 3e5c2504c0..2adc627688 100644 --- a/stb_vorbis.c +++ b/stb_vorbis.c @@ -1401,7 +1401,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;