Skip to content

Commit c1deead

Browse files
committed
Do not use MIN/MAX for portability reasons
* Does not work on windows so well
1 parent 3ef0b16 commit c1deead

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/vorbisfile.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,9 @@ vorbis_comment *ov_comment(OggVorbis_File *vf,int link){
19131913
}
19141914

19151915
void ov_set_read_size(OggVorbis_File *vf,int read_size) {
1916-
vf->read_size = MAX(1, MIN(read_size, CHUNKSIZE));
1916+
read_size = read_size > CHUNKSIZE ? CHUNKSIZE : read_size;
1917+
read_size = read_size < 1 : 1 : read_size;
1918+
vf->read_size = read_size;
19171919
}
19181920

19191921
int ov_get_read_size(OggVorbis_File *vf) {

0 commit comments

Comments
 (0)