Fix extension name comparison for DLL files

This commit is contained in:
Thilo Schulz 2011-07-24 22:12:21 +00:00
parent 22552c7bab
commit c4f739b8d0
3 changed files with 26 additions and 1 deletions

View file

@ -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;
}
/*
==================