Re: [AD] patch for get_config_string

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Eduard Bloch wrote:
> I found a potential bug in a configuration routine. The problem was:
> if a string variable is given in the configuration file, but has no
> content, the pointer to the dataset with an EMPTY string is returned
> by find_config_string. With this fix, the function returns NULL and
> allows get_config_string to return the default value instead.

Is this really a bug? I think it makes sense to make a distinction
between config variables that don't exist in a .cfg file and config
variables that exist but are initialized to the empty string: In the
first case it means you want the default behaviour and in the latter
case it means that you really want an empty string (which is useful in
some cases). If you really want an empty string to mean the default
string, then that can easily be handled by the program. With this patch
there is AFAICS no way to give an empty string in a config file.

Sven



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/