kwo pushed a commit to branch master.

commit ceabc2e96dfb1179c175367e47dd227696a9f000
Author: Kim Woelders <[email protected]>
Date:   Sun Jun 9 20:35:47 2013 +0200

    Clear SF_INFO struct before calling sf_open().
    
    According to the docs only format needs to be set to zero, but let's
    just zero it entirely.
---
 src/sound_load.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sound_load.c b/src/sound_load.c
index de0dad0..6a5cb59 100644
--- a/src/sound_load.c
+++ b/src/sound_load.c
@@ -86,6 +86,7 @@ SoundSampleGetData(const char *file, SoundSampleData * ssd)
    SF_INFO             sf_info;
    int                 bytes_per_frame, frame_count, frames_read;
 
+   memset(&sf_info, 0, sizeof(sf_info));
    sf = sf_open(file, SFM_READ, &sf_info);
    if (!sf)
       return -1;

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to