Commit 2c88f1bf authored by Antoine Cellerier's avatar Antoine Cellerier

Always enforce the "don't show if unavailable" option in format strings.

parent f7c80360
...@@ -638,7 +638,7 @@ char *str_format_time( const char *tformat ) ...@@ -638,7 +638,7 @@ char *str_format_time( const char *tformat )
d += len; \ d += len; \
free( string ); \ free( string ); \
} \ } \
else \ else if( !b_empty_if_na ) \
{ \ { \
*(dst+d) = '-'; \ *(dst+d) = '-'; \
d++; \ d++; \
...@@ -655,8 +655,8 @@ char *str_format_time( const char *tformat ) ...@@ -655,8 +655,8 @@ char *str_format_time( const char *tformat )
char *__str_format_meta( vlc_object_t *p_object, const char *string ) char *__str_format_meta( vlc_object_t *p_object, const char *string )
{ {
const char *s = string; const char *s = string;
int b_is_format = 0; bool b_is_format = false;
int b_empty_if_na = 0; bool b_empty_if_na = false;
char buf[10]; char buf[10];
int i_size = strlen( string ) + 1; /* +1 to store '\0' */ int i_size = strlen( string ) + 1; /* +1 to store '\0' */
char *dst = strdup( string ); char *dst = strdup( string );
...@@ -938,7 +938,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -938,7 +938,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
break; break;
case ' ': case ' ':
b_empty_if_na = 1; b_empty_if_na = true;
break; break;
default: default:
...@@ -947,12 +947,12 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -947,12 +947,12 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
break; break;
} }
if( *s != ' ' ) if( *s != ' ' )
b_is_format = 0; b_is_format = false;
} }
else if( *s == '$' ) else if( *s == '$' )
{ {
b_is_format = 1; b_is_format = true;
b_empty_if_na = 0; b_empty_if_na = false;
} }
else else
{ {
......
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