Fix for bug 88500. GetChildList should return prefs relative to the root branch. r=mscott, sr=alecf.

This commit is contained in:
bnesse%netscape.com 2001-07-05 17:51:27 +00:00
Родитель ee5d06c50c
Коммит ccbe76ac33
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -523,7 +523,9 @@ NS_IMETHODIMP nsPrefBranch::GetChildList(const char *aStartingAt, PRUint32 *aCou
return NS_ERROR_OUT_OF_MEMORY;
for (dwIndex = 0; dwIndex < numPrefs; ++dwIndex) {
theElement = (char *)prefArray.ElementAt(dwIndex);
// we need to lop off mPrefRoot in case the user is planning to pass this
// back to us because if they do we are going to add mPrefRoot again.
theElement = ((char *)prefArray.ElementAt(dwIndex)) + mPrefRootLength;
outArray[dwIndex] = (char *)nsMemory::Clone(theElement, strlen(theElement) + 1);
if (!outArray[dwIndex]) {