Skip to content

Commit e6775a3

Browse files
committed
stb_vorbis: sync with stb_vorbis SDL fork
1 parent 6112667 commit e6775a3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/codecs/stb_vorbis/stb_vorbis.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,10 @@ enum STBVorbisError
620620
#include <limits.h>
621621

622622
#ifndef STB_FORCEINLINE
623-
#if defined(_MSC_VER)
623+
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
624624
#define STB_FORCEINLINE __forceinline
625+
#elif defined(_MSC_VER)
626+
#define STB_FORCEINLINE static __inline
625627
#elif (defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))) || defined(__clang__)
626628
#define STB_FORCEINLINE static __inline __attribute__((always_inline))
627629
#else
@@ -5518,7 +5520,7 @@ static int fixup_current_playback_loc(stb_vorbis *f, int n)
55185520

55195521
f->current_playback_loc += n;
55205522
lgs = stb_vorbis_stream_length_in_samples(f);
5521-
if (f->current_playback_loc > lgs && lgs > 0 && lgs != SAMPLE_unknown) {
5523+
if (lgs != 0 && lgs != SAMPLE_unknown && f->current_playback_loc > (int)lgs) {
55225524
int r = n - (f->current_playback_loc - (int)lgs);
55235525
f->current_playback_loc = lgs;
55245526
return r;

0 commit comments

Comments
 (0)