Commit 6162f894 authored by Christophe Mutricy's avatar Christophe Mutricy

Fix saving of strings config variables. Patch courtesy of Andrew Zaikin

parent eb90d834
...@@ -21,6 +21,7 @@ André de Barros Martins Ribeiro <andrerib at ajato.com.br> - Brazilian portugue ...@@ -21,6 +21,7 @@ André de Barros Martins Ribeiro <andrerib at ajato.com.br> - Brazilian portugue
Andre Pang <adre.pang at csiro dot au> - Annodex support Andre Pang <adre.pang at csiro dot au> - Annodex support
Andre Weber <WeberAndre at gmx d0t de> - Qt4 patches Andre Weber <WeberAndre at gmx d0t de> - Qt4 patches
Andres Krapf <dae at via.ecp.fr> - FreeBSD port and tests, KDE interface Andres Krapf <dae at via.ecp.fr> - FreeBSD port and tests, KDE interface
Andrew Zaikin <andrew dot zaikin at gmail dot com> - Config saving fixes
Andrey Brilevskiy <director at macwest.ru> - Russian translation Andrey Brilevskiy <director at macwest.ru> - Russian translation
Andy Lindsay <andy_vl at ananam.com> - fixes in the TS demux Andy Lindsay <andy_vl at ananam.com> - fixes in the TS demux
Arkadiusz Lipiec <A.Lipiec at elka.pw.edu.pl> - Polish translation Arkadiusz Lipiec <A.Lipiec at elka.pw.edu.pl> - Polish translation
......
...@@ -595,19 +595,20 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, ...@@ -595,19 +595,20 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
: (p_item->orig.psz != NULL); : (p_item->orig.psz != NULL);
config_Write (file, p_item->psz_text, N_("string"), config_Write (file, p_item->psz_text, N_("string"),
modified, p_item->psz_name, "%s", !modified, p_item->psz_name, "%s",
psz_value ? psz_value : ""); psz_value ? psz_value : "");
if (b_retain) if ( !b_retain )
break; {
free ((char *)p_item->saved.psz); free ((char *)p_item->saved.psz);
if( (psz_value && p_item->orig.psz && if( (psz_value && p_item->orig.psz &&
strcmp( psz_value, p_item->orig.psz )) || strcmp( psz_value, p_item->orig.psz )) ||
!psz_value || !p_item->orig.psz) !psz_value || !p_item->orig.psz)
p_item->saved.psz = strdupnull (psz_value); p_item->saved.psz = strdupnull (psz_value);
else else
p_item->saved.psz = NULL; p_item->saved.psz = NULL;
}
} }
if (!b_retain) if (!b_retain)
......
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