diff options
author | James Haley | 2010-09-18 17:35:57 +0000 |
---|---|---|
committer | James Haley | 2010-09-18 17:35:57 +0000 |
commit | 5de507694b0ca43739033d75cf20fcf7ea31a2dd (patch) | |
tree | 931db2024210a6396df2808c8cd626b7bcb19991 /src/strife/s_sound.c | |
parent | bf215f516ed4742fd19b920d8a5d3f6738375168 (diff) | |
download | chocolate-doom-5de507694b0ca43739033d75cf20fcf7ea31a2dd.tar.gz chocolate-doom-5de507694b0ca43739033d75cf20fcf7ea31a2dd.tar.bz2 chocolate-doom-5de507694b0ca43739033d75cf20fcf7ea31a2dd.zip |
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
Diffstat (limited to 'src/strife/s_sound.c')
-rw-r--r-- | src/strife/s_sound.c | 11 |
1 files changed, 9 insertions, 2 deletions
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 <stdio.h> #include <stdlib.h> +#include <ctype.h> #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); |