Don't abort PROFILE_GetSection on empty keys.

This commit is contained in:
Alexandre Julliard 1999-01-26 17:29:49 +00:00
parent 6bc8bbd3b0
commit 9416abaff7
1 changed files with 2 additions and 1 deletions

View File

@ -555,9 +555,10 @@ static INT32 PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name,
if (section->name && !strcasecmp( section->name, section_name ))
{
UINT32 oldlen = len;
for (key = section->key; key && *(key->name); key = key->next)
for (key = section->key; key; key = key->next)
{
if (len <= 2) break;
if (!*key->name) continue; /* Skip empty lines */
if (IS_ENTRY_COMMENT(key->name)) continue; /* Skip comments */
PROFILE_CopyEntry( buffer, key->name, len - 1, handle_env );
len -= strlen(buffer) + 1;