Skip to content

Commit f61fe5f

Browse files
committed
Don't open .pk3 files as OpenAL drivers.
1 parent 376267d commit f61fe5f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: code/client/snd_openal.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -2512,11 +2512,17 @@ qboolean S_AL_Init( soundInterface_t *si )
25122512
s_alRolloff = Cvar_Get( "s_alRolloff", "2", CVAR_CHEAT);
25132513
s_alGraceDistance = Cvar_Get("s_alGraceDistance", "512", CVAR_CHEAT);
25142514

2515-
s_alDriver = Cvar_Get( "s_alDriver", ALDRIVER_DEFAULT, CVAR_ARCHIVE | CVAR_LATCH );
2515+
s_alDriver = Cvar_Get( "s_alDriver", ALDRIVER_DEFAULT, CVAR_ARCHIVE | CVAR_LATCH | CVAR_PROTECTED );
25162516

25172517
s_alInputDevice = Cvar_Get( "s_alInputDevice", "", CVAR_ARCHIVE | CVAR_LATCH );
25182518
s_alDevice = Cvar_Get("s_alDevice", "", CVAR_ARCHIVE | CVAR_LATCH);
25192519

2520+
if ( COM_CompareExtension( s_alDriver->string, ".pk3" ) )
2521+
{
2522+
Com_Printf( "Rejecting DLL named \"%s\"", s_alDriver->string );
2523+
return qfalse;
2524+
}
2525+
25202526
// Load QAL
25212527
if( !QAL_Init( s_alDriver->string ) )
25222528
{

0 commit comments

Comments
 (0)