Commit 6cb1b6ed authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

As a work-around, accept both decimal separators when...

deserializing floats from configuration (fixes #589)

I know this is NOT the “right” way to fix this.
The “right” way would be to remove floats from the configuration...
but there are approximately one float parameter in the core and 46 ones
in our current plugins set, none of which I use myself. So I am
defintely not going to rewrite all^H^H^Hany of them.

Of course, it would be cleaner to be “strict”  in what we write to
the configuration file, than “liberal” in what we accept... but IMHO,
it is way easier and more robust to be liberal in what we accept in
this particular case (ie. accepting both decimal separators is trivial,
while serializing float numbers manually is complex).
parent e63d66d5
......@@ -894,7 +894,7 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
case CONFIG_ITEM_FLOAT:
if( !*psz_option_value )
break; /* ignore empty option */
p_item->f_value = (float)atof( psz_option_value);
p_item->f_value = (float)i18n_atof( psz_option_value);
p_item->f_value_saved = p_item->f_value;
#if 0
msg_Dbg( p_this, "option \"%s\", value %f",
......
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