summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sound/oalsound/buffer.cpp3
-rw-r--r--src/ui/studio.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/sound/oalsound/buffer.cpp b/src/sound/oalsound/buffer.cpp
index 193e624..0047f91 100644
--- a/src/sound/oalsound/buffer.cpp
+++ b/src/sound/oalsound/buffer.cpp
@@ -17,6 +17,8 @@
#include "sound/oalsound/buffer.h"
+#include <cstring>
+
Buffer::Buffer()
{
m_loaded = false;
@@ -41,6 +43,7 @@ bool Buffer::LoadFromFile(std::string filename, Sound sound)
GetLogger()->Debug("Loading audio file: %s\n", filename.c_str());
SF_INFO fileInfo;
+ memset(&fileInfo, 0, sizeof(SF_INFO));
SNDFILE *file = sf_open(filename.c_str(), SFM_READ, &fileInfo);
GetLogger()->Trace(" channels %d\n", fileInfo.channels);
diff --git a/src/ui/studio.cpp b/src/ui/studio.cpp
index 24a64c4..e44a465 100644
--- a/src/ui/studio.cpp
+++ b/src/ui/studio.cpp
@@ -904,7 +904,7 @@ void CStudio::SetInfoText(std::string text, bool bClickable)
if ( list == 0 ) return;
list->Flush(); // just text
- list->SetName(0, text.c_str());
+ list->SetItemName(0, text.c_str());
if ( text[0] == 0 ) bClickable = false;
list->SetSelectCap(bClickable);