Fix extension name comparison for DLL files
This commit is contained in:
parent
22552c7bab
commit
c4f739b8d0
3 changed files with 26 additions and 1 deletions
|
@ -82,6 +82,30 @@ void COM_StripExtension( const char *in, char *out, int destsize )
|
|||
Q_strncpyz(out, in, destsize);
|
||||
}
|
||||
|
||||
/*
|
||||
============
|
||||
COM_CompareExtension
|
||||
|
||||
string compare the end of the strings and return qtrue if strings match
|
||||
============
|
||||
*/
|
||||
qboolean COM_CompareExtension(const char *in, const char *ext)
|
||||
{
|
||||
int inlen, extlen;
|
||||
|
||||
inlen = strlen(in);
|
||||
extlen = strlen(ext);
|
||||
|
||||
if(extlen <= inlen)
|
||||
{
|
||||
in += inlen - extlen;
|
||||
|
||||
if(!Q_stricmp(in, ext))
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue