for(index=0; index < fontcount; index++)
for(index=0; index < PR_MIN(fontcount,MAX_FONTDETAIL); index++)
static nsFontFamily* GetFontNames(char* aPattern){  nsFontFamily* family = nsnull;  int         MAX_FONTDETAIL = 30;  FontDetails fDetails[MAX_FONTDETAIL];  int         fontcount;    fontcount = PfQueryFonts('a', PHFONT_ALL_FONTS, fDetails, MAX_FONTDETAIL);    if (fontcount >= MAX_FONTDETAIL)    {      NS_WARNING("nsFontMetricsPh::GetFontNames ERROR - Font Array size should be increased!\n");    }    if (fontcount)    {      int index;      for(index=0; index < fontcount; index++)      {        nsAutoString familyName2(fDetails[index].desc);        family = (nsFontFamily*) PL_HashTableLookup(gFamilies, (nsString*) &familyName2);        if (!family)        {          family = new nsFontFamily;          if (!family)          {            continue;          }          nsString* copy = new nsString(fDetails[index].desc);          if (!copy) {           delete family;           continue;          }          PL_HashTableAdd(gFamilies, copy, family);    }            }    }}