Return the correct length when getting a complete section in
PROFILE_GetString.
This commit is contained in:
parent
33817372fe
commit
e921e4664d
|
@ -861,11 +861,13 @@ static INT PROFILE_GetString( LPCSTR section, LPCSTR key_name,
|
||||||
/* no "else" here ! */
|
/* no "else" here ! */
|
||||||
if (section && section[0])
|
if (section && section[0])
|
||||||
{
|
{
|
||||||
PROFILE_GetSection(CurProfile->section, section, buffer, len,
|
INT ret = PROFILE_GetSection(CurProfile->section, section, buffer, len, FALSE, FALSE);
|
||||||
FALSE, FALSE);
|
if (!buffer[0]) /* no luck -> def_val */
|
||||||
if (!buffer[0]) /* no luck -> def_val */
|
{
|
||||||
PROFILE_CopyEntry(buffer, def_val, len, FALSE);
|
PROFILE_CopyEntry(buffer, def_val, len, FALSE);
|
||||||
return strlen(buffer);
|
ret = strlen(buffer);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
buffer[0] = '\0';
|
buffer[0] = '\0';
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue