[quake3-commits] r1976 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu May 12 06:53:36 EDT 2011


Author: thilo
Date: 2011-05-12 06:53:36 -0400 (Thu, 12 May 2011)
New Revision: 1976

Modified:
   trunk/code/client/snd_codec.c
Log:
Fix crash bug in new codec audio loader, thanks brain for reporting


Modified: trunk/code/client/snd_codec.c
===================================================================
--- trunk/code/client/snd_codec.c	2011-05-11 14:33:12 UTC (rev 1975)
+++ trunk/code/client/snd_codec.c	2011-05-12 10:53:36 UTC (rev 1976)
@@ -28,31 +28,6 @@
 
 /*
 =================
-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
 
 Opens/loads a sound, tries codec based on the sound's file extension
@@ -71,7 +46,7 @@
 
 	Q_strncpyz(localName, filename, MAX_QPATH);
 
-	ext = S_FileExtension(localName);
+	ext = COM_GetExtension(localName);
 
 	if( *ext )
 	{



More information about the quake3-commits mailing list