mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-29 19:37:30 +01:00
Fix possible pcm_bytes_to_samples overflow
This commit is contained in:
parent
397c6e0e81
commit
7372ffdc5c
@ -221,5 +221,5 @@ void decode_pcmfloat(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspac
|
||||
}
|
||||
|
||||
size_t pcm_bytes_to_samples(size_t bytes, int channels, int bits_per_sample) {
|
||||
return (bytes * 8) / channels / bits_per_sample;
|
||||
return ((int64_t)bytes * 8) / channels / bits_per_sample;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user