From ae264a8192d609e6e24c7e7a65214ac676b92300 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Thu, 12 May 2011 10:53:36 +0000 Subject: Fix crash bug in new codec audio loader, thanks brain for reporting --- src/client/snd_codec.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/src/client/snd_codec.c b/src/client/snd_codec.c index f3c5dda9..61403148 100644 --- a/src/client/snd_codec.c +++ b/src/client/snd_codec.c @@ -27,31 +27,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA static snd_codec_t *codecs; -/* -================= -S_FileExtension -================= -*/ -static char *S_FileExtension(const char *fni) -{ - // we should search from the ending to the last '/' - - char *fn = (char *) fni + strlen(fni) - 1; - char *eptr = NULL; - - while(*fn != '/' && fn != fni) - { - if(*fn == '.') - { - eptr = fn; - break; - } - fn--; - } - - return eptr; -} - /* ================= S_CodecGetSound @@ -72,7 +47,7 @@ static void *S_CodecGetSound(const char *filename, snd_info_t *info) Q_strncpyz(localName, filename, MAX_QPATH); - ext = S_FileExtension(localName); + ext = COM_GetExtension(localName); if( *ext ) { -- cgit