Skip to content

Commit

Permalink
Use correct constant
Browse files Browse the repository at this point in the history
TITLES_MAX was used as length of string "/video_ts".
There's no relation between these two constants.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
  • Loading branch information
hpi1 authored and jbkempf committed May 20, 2015
1 parent a0b8b3e commit 75c0cae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dvd_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}

Expand Down

0 comments on commit 75c0cae

Please sign in to comment.