]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mem.c
Modified the sound code so it can handle sounds outside of a "sound" subdirectory.
[xonotic/darkplaces.git] / snd_mem.c
index a10b2631f62959b047ddadabd51f9219af3d86de..2cb01bee3adae3d371761c105cad2975153f9c53 100644 (file)
--- a/snd_mem.c
+++ b/snd_mem.c
@@ -212,7 +212,7 @@ size_t ResampleSfx (const qbyte *in_data, size_t in_length, const snd_format_t*
 S_LoadSound
 ==============
 */
-qboolean S_LoadSound (sfx_t *s, int complain)
+qboolean S_LoadSound (sfx_t *s, qboolean complain)
 {
        char namebuffer[MAX_QPATH];
        size_t len;
@@ -228,7 +228,7 @@ qboolean S_LoadSound (sfx_t *s, int complain)
                return true;
        }
 
-       len = snprintf (namebuffer, sizeof (namebuffer), "sound/%s", s->name);
+       len = strlcpy (namebuffer, s->name, sizeof (namebuffer));
        if (len >= sizeof (namebuffer))
                return false;