Pārlūkot izejas kodu

Bugfix for missing initialization of data pointers in AudioPlaySdWav

If AudioPlaySdWav::block_left / block_right are not properly initialized to NULL, AudioPlaySdWav::begin() may crash, because their usage in AudioStream::release() may lead to undefined behavior.
dds
Timo Sandmann pirms 6 gadiem
vecāks
revīzija
3885801da8
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      play_sd_wav.h

+ 1
- 1
play_sd_wav.h Parādīt failu

@@ -34,7 +34,7 @@
class AudioPlaySdWav : public AudioStream
{
public:
AudioPlaySdWav(void) : AudioStream(0, NULL) { begin(); }
AudioPlaySdWav(void) : AudioStream(0, NULL), block_left(NULL), block_right(NULL) { begin(); }
void begin(void);
bool play(const char *filename);
void stop(void);

Notiek ielāde…
Atcelt
Saglabāt