mirror of
https://github.com/SFML/SFML.git
synced 2024-12-11 12:39:15 +08:00
Fixed compile error caused by latest modification
This commit is contained in:
parent
b92dc572e3
commit
b52da13a20
@ -385,7 +385,8 @@ sf_count_t SoundFile::Stream::read(void* ptr, sf_count_t count, void* userData)
|
|||||||
Int64 position = stream->source->tell();
|
Int64 position = stream->source->tell();
|
||||||
if (position != -1)
|
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<char*>(ptr), count);
|
return stream->source->read(reinterpret_cast<char*>(ptr), count);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user