Commit c4c091d4 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

krnl386.exe: Return the default value if the section wasn't found in GetPrivateProfileString16().

Using GetPrivateProfileStringA() for removing trailing spaces etc. This restores behaviour from before 86c6021c.
parent 41a76b95
...@@ -555,9 +555,8 @@ INT16 WINAPI GetPrivateProfileString16( LPCSTR section, LPCSTR entry, ...@@ -555,9 +555,8 @@ INT16 WINAPI GetPrivateProfileString16( LPCSTR section, LPCSTR entry,
ret = GetPrivateProfileSectionA( section, data, size, filename ); ret = GetPrivateProfileSectionA( section, data, size, filename );
if (!ret) if (!ret)
{ {
if (len) *buffer = 0;
HeapFree( GetProcessHeap(), 0, data ); HeapFree( GetProcessHeap(), 0, data );
return 0; return GetPrivateProfileStringA( section, entry, def_val, buffer, len, filename );
} }
if (ret != size - 2) break; if (ret != size - 2) break;
/* overflow, try again */ /* overflow, try again */
......
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