]> git.sesse.net Git - vlc/commitdiff
Use strrchr to extract the file's extension
authorSreng Jean <fox@videolan.org>
Mon, 1 May 2006 21:20:09 +0000 (21:20 +0000)
committerSreng Jean <fox@videolan.org>
Mon, 1 May 2006 21:20:09 +0000 (21:20 +0000)
modules/demux/mod.c

index a318e739c243471eeab39f9311d71957dd0ac65b..316388cc6a0337fe48e7e55742ca4d762756628d 100644 (file)
@@ -140,7 +140,7 @@ static int Open( vlc_object_t *p_this )
     /* We accept file based on extension match */
     if( strcasecmp( p_demux->psz_demux, "mod" ) )
     {
-        if( ( ext = strchr( p_demux->psz_path, '.' ) ) == NULL ||
+        if( ( ext = strrchr( p_demux->psz_path, '.' ) ) == NULL ||
             stream_Size( p_demux->s ) == 0 ) return VLC_EGENERIC;
 
         ext++;  /* skip . */