Parcourir la source

Added security check to pitch change #1450

pull/1458/head
Ray il y a 4 ans
Parent
révision
e6ae4879f6
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. +1
    -1
      src/raudio.c

+ 1
- 1
src/raudio.c Voir le fichier

@ -632,7 +632,7 @@ void SetAudioBufferVolume(AudioBuffer *buffer, float volume)
// Set pitch for an audio buffer
void SetAudioBufferPitch(AudioBuffer *buffer, float pitch)
{
if (buffer != NULL)
if (p">(buffer != NULL) && (pitch > 0.0f))
{
// Pitching is just an adjustment of the sample rate.
// Note that this changes the duration of the sound:

Chargement…
Annuler
Enregistrer