From 5de507694b0ca43739033d75cf20fcf7ea31a2dd Mon Sep 17 00:00:00 2001 From: James Haley Date: Sat, 18 Sep 2010 17:35:57 +0000 Subject: Tons of warnings fixed - now only 7 warnings at warning level 3, and most of those are outside of our own code (get on those signed/unsigned mismatches in the midi code, fraggle ;) Subversion-branch: /branches/strife-branch Subversion-revision: 2110 --- src/strife/s_sound.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/strife/s_sound.c') diff --git a/src/strife/s_sound.c b/src/strife/s_sound.c index b9357181..47b33089 100644 --- a/src/strife/s_sound.c +++ b/src/strife/s_sound.c @@ -25,6 +25,7 @@ #include #include +#include #include "i_sound.h" #include "i_system.h" @@ -590,6 +591,7 @@ void I_StartVoice(const char *lumpname) { int lumpnum; voiceinfo_t *voice; // choco-specific + char lumpnamedup[9]; // no voices in deathmatch mode. if(netgame) @@ -613,10 +615,15 @@ void I_StartVoice(const char *lumpname) if(lumpname == NULL) return; - if((lumpnum = W_CheckNumForName(lumpname)) != -1) + // Because of constness problems... + strncpy(lumpnamedup, lumpname, 9); + lumpnamedup[8] = '\0'; + + + if((lumpnum = W_CheckNumForName(lumpnamedup)) != -1) { // haleyjd: Choco-specific: get a voice structure - voice = S_getVoice(lumpname, lumpnum); + voice = S_getVoice(lumpnamedup, lumpnum); // get a channel for the voice i_voicehandle = S_GetChannel(NULL, &voice->sfx, true); -- cgit v1.2.3