mirror of
https://github.com/SFML/SFML.git
synced 2025-02-08 01:18:02 +08:00
Fix incorrect cast when loading 16-bit samples from WAV file
This commit is contained in:
parent
33cb8f4391
commit
9842c8fdf8
@ -50,7 +50,7 @@ namespace
|
|||||||
if (static_cast<std::size_t>(stream.read(bytes, static_cast<sf::Int64>(sizeof(bytes)))) != sizeof(bytes))
|
if (static_cast<std::size_t>(stream.read(bytes, static_cast<sf::Int64>(sizeof(bytes)))) != sizeof(bytes))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
value = static_cast<sf::Uint8>(bytes[0] | (bytes[1] << 8));
|
value = static_cast<sf::Int16>(bytes[0] | (bytes[1] << 8));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user