- Check for invalid filename in OpenAL's RegisterSound function.
- Changed Base sound system to warn not error when sound filename is empty or too long.
This commit is contained in:
1 parent
6c1045a003
commit
3da8779180
2 files changed
+22
-6
No files matched your search
@@ -194,6 +194,20 @@ static sfxHandle_t S_AL_BufferFind(const char *filename)
|
||||
sfxHandle_t sfx = -1;
|
||||
int i;
|
||||
|
||||
if ( !filename ) {
|
||||
Com_Error( ERR_FATAL, "Sound name is NULL" );
|
||||
}
|
||||
|
||||
if ( !filename[0] ) {
|
||||
Com_Printf( S_COLOR_YELLOW "WARNING: Sound name is empty\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( strlen( filename ) >= MAX_QPATH ) {
|
||||
Com_Printf( S_COLOR_YELLOW "WARNING: Sound name is too long: %s\n", filename );
|
||||
return 0;
|
||||
}
|
||||
|
||||
for(i = 0; i < numSfx; i++)
|
||||
{
|
||||
if(!Q_stricmp(knownSfx[i].filename, filename))
|
||||
|
||||
Reference in new issue
Block a user