Conf: Fix get_opt if there is no option value in quote

This commit is contained in:
Martin Duquesnoy 2009-09-15 17:22:31 +02:00
parent dc03eb8aa5
commit 4c8d25ff36

View File

@ -193,7 +193,7 @@ get_opt(char *src, char *def, char *name)
opt_type ret = null_opt_type;
if(!src || !name)
return (def) ? str_to_opt(def) : null_opt_type;
return (def) ? str_to_opt(def) : ret;
if((p = opt_srch(erase_sec_content(src), name)))
{
@ -220,7 +220,8 @@ get_opt(char *src, char *def, char *name)
ret = str_to_opt(clean_value(++p));
}
}
else
if(!ret.str)
ret = str_to_opt(def);
return ret;