summaryrefslogtreecommitdiff
path: root/src/strife/s_sound.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strife/s_sound.c')
-rw-r--r--src/strife/s_sound.c11
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);