From b52da13a20dc97cd8b61c351688f86887cd94297 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Fri, 10 May 2013 15:51:53 +0200 Subject: [PATCH] Fixed compile error caused by latest modification --- src/SFML/Audio/SoundFile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SFML/Audio/SoundFile.cpp b/src/SFML/Audio/SoundFile.cpp index 0b19138a..5e253274 100644 --- a/src/SFML/Audio/SoundFile.cpp +++ b/src/SFML/Audio/SoundFile.cpp @@ -385,7 +385,8 @@ sf_count_t SoundFile::Stream::read(void* ptr, sf_count_t count, void* userData) Int64 position = stream->source->tell(); if (position != -1) { - count = std::min(count, stream->size - position); + if (count > stream->size - position) + count = stream->size - position; return stream->source->read(reinterpret_cast(ptr), count); } else