From 28b8183a79777c3068953d31b1acd398472d955c Mon Sep 17 00:00:00 2001 From: Will Sackfield Date: Tue, 5 Dec 2017 07:05:15 -0500 Subject: [PATCH] Do not use MIN/MAX for portability reasons * Does not work on windows so well --- lib/vorbisfile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vorbisfile.c b/lib/vorbisfile.c index 3fa29dd28..a97fed8ba 100644 --- a/lib/vorbisfile.c +++ b/lib/vorbisfile.c @@ -1913,7 +1913,9 @@ vorbis_comment *ov_comment(OggVorbis_File *vf,int link){ } void ov_set_read_size(OggVorbis_File *vf,int read_size) { - vf->read_size = MAX(1, MIN(read_size, CHUNKSIZE)); + read_size = read_size > CHUNKSIZE ? CHUNKSIZE : read_size; + read_size = read_size < 1 ? 1 : read_size; + vf->read_size = read_size; } int ov_get_read_size(OggVorbis_File *vf) {