Bug fix - made static array lengths match up

This commit is contained in:
amusil%netscape.com 1999-04-23 21:53:43 +00:00
parent e56b4d4ac8
commit 5802959950

View File

@ -255,23 +255,23 @@ typedef enum CAPS_TARGET {
CAPS_TARGET_URL_SEND_MAIL,
CAPS_TARGET_DESC_REG_PRIVATE,
CAPS_TARGET_DETAIL_DESC_REG_PRIVATE,
CAPS_TARGET_DETAIL_DESC_REG_PRIVATE_1,
// CAPS_TARGET_DETAIL_DESC_REG_PRIVATE_1,
CAPS_TARGET_URL_REG_PRIVATE,
CAPS_TARGET_DESC_REG_STANDARD,
CAPS_TARGET_DETAIL_DESC_REG_STANDARD,
CAPS_TARGET_DETAIL_DESC_REG_STANDARD_1,
CAPS_TARGET_DETAIL_DESC_REG_STANDARD_2,
// CAPS_TARGET_DETAIL_DESC_REG_STANDARD_1,
// CAPS_TARGET_DETAIL_DESC_REG_STANDARD_2,
CAPS_TARGET_URL_REG_STANDARD,
CAPS_TARGET_DESC_REG_ADMIN,
CAPS_TARGET_DETAIL_DESC_REG_ADMIN,
CAPS_TARGET_DETAIL_DESC_REG_ADMIN_1,
// CAPS_TARGET_DETAIL_DESC_REG_ADMIN_1,
CAPS_TARGET_URL_REG_ADMIN,
CAPS_TARGET_DESC_ACCOUNT_SETUP,
CAPS_TARGET_DETAIL_DESC_ACCOUNT_SETUP,
CAPS_TARGET_URL_ACCOUNT_SETUP,
CAPS_TARGET_DESC_SAR,
CAPS_TARGET_DETAIL_DESC_SAR,
CAPS_TARGET_DETAIL_DESC_SAR_1,
// CAPS_TARGET_DETAIL_DESC_SAR_1,
CAPS_TARGET_URL_SAR,
CAPS_TARGET_DESC_CANVAS_ACCESS,
CAPS_TARGET_DETAIL_DESC_CANVAS_ACCESS,
@ -351,23 +351,23 @@ extern int CAPS_TARGET_DETAIL_DESC_SEND_MAIL;
extern int CAPS_TARGET_URL_SEND_MAIL;
extern int CAPS_TARGET_DESC_REG_PRIVATE;
extern int CAPS_TARGET_DETAIL_DESC_REG_PRIVATE;
extern int CAPS_TARGET_DETAIL_DESC_REG_PRIVATE_1;
//extern int CAPS_TARGET_DETAIL_DESC_REG_PRIVATE_1;
extern int CAPS_TARGET_URL_REG_PRIVATE;
extern int CAPS_TARGET_DESC_REG_STANDARD;
extern int CAPS_TARGET_DETAIL_DESC_REG_STANDARD;
extern int CAPS_TARGET_DETAIL_DESC_REG_STANDARD_1;
extern int CAPS_TARGET_DETAIL_DESC_REG_STANDARD_2;
//extern int CAPS_TARGET_DETAIL_DESC_REG_STANDARD_1;
//extern int CAPS_TARGET_DETAIL_DESC_REG_STANDARD_2;
extern int CAPS_TARGET_URL_REG_STANDARD;
extern int CAPS_TARGET_DESC_REG_ADMIN;
extern int CAPS_TARGET_DETAIL_DESC_REG_ADMIN;
extern int CAPS_TARGET_DETAIL_DESC_REG_ADMIN_1;
//extern int CAPS_TARGET_DETAIL_DESC_REG_ADMIN_1;
extern int CAPS_TARGET_URL_REG_ADMIN;
extern int CAPS_TARGET_DESC_ACCOUNT_SETUP;
extern int CAPS_TARGET_DETAIL_DESC_ACCOUNT_SETUP;
extern int CAPS_TARGET_URL_ACCOUNT_SETUP;
extern int CAPS_TARGET_DESC_SAR;
extern int CAPS_TARGET_DETAIL_DESC_SAR;
extern int CAPS_TARGET_DETAIL_DESC_SAR_1;
//extern int CAPS_TARGET_DETAIL_DESC_SAR_1;
extern int CAPS_TARGET_URL_SAR;
extern int CAPS_TARGET_DESC_CANVAS_ACCESS;
extern int CAPS_TARGET_DETAIL_DESC_CANVAS_ACCESS;
@ -1147,9 +1147,13 @@ void nsTarget::init(char *name, nsPrincipal *prin, nsTargetArray* targetArray,
for (PRUint32 i=targetArray->GetSize(); i-- > 0;) {
nsTarget *target = (nsTarget *)targetArray->Get(i);
PR_ASSERT(target->itsPrincipal == prin);
if (target->itsRisk > itsRisk) {
itsRisk = target->itsRisk;
if (target != NULL)
{
PR_ASSERT(target->itsPrincipal == prin);
if (target->itsRisk > itsRisk) {
itsRisk = target->itsRisk;
}
}
}
// itsTargetArray = new nsTargetArray();