Commit 75c0cae2 authored by Petri Hintukainen's avatar Petri Hintukainen Committed by Jean-Baptiste Kempf

Use correct constant

TITLES_MAX was used as length of string "/video_ts".
There's no relation between these two constants.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent a0b8b3e4
......@@ -484,16 +484,16 @@ static dvd_reader_t *DVDOpenCommon( const char *ppath,
}
#if defined(_WIN32) || defined(__OS2__)
if(strlen(path_copy) > TITLES_MAX) {
if(!strcasecmp(&(path_copy[strlen( path_copy ) - TITLES_MAX]),
if( strlen( path_copy ) > 9 ) {
if( !strcasecmp( &(path_copy[ strlen( path_copy ) - 9 ]),
"\\video_ts"))
path_copy[strlen(path_copy) - (TITLES_MAX-1)] = '\0';
path_copy[ strlen( path_copy ) - (9-1) ] = '\0';
}
#endif
if( strlen( path_copy ) > TITLES_MAX ) {
if( !strcasecmp( &(path_copy[ strlen( path_copy ) - TITLES_MAX ]),
if( strlen( path_copy ) > 9 ) {
if( !strcasecmp( &(path_copy[ strlen( path_copy ) - 9 ]),
"/video_ts" ) ) {
path_copy[ strlen( path_copy ) - TITLES_MAX ] = '\0';
path_copy[ strlen( path_copy ) - 9 ] = '\0';
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment