diff --git a/public/crtlib.c b/public/crtlib.c index 281d11fe..bec512d2 100644 --- a/public/crtlib.c +++ b/public/crtlib.c @@ -858,7 +858,11 @@ void COM_StripExtension( char *path ) { size_t length; - length = Q_strlen( path ) - 1; + length = Q_strlen( path ); + + if( length > 0 ) + length--; + while( length > 0 && path[length] != '.' ) { length--;