diff --git a/commands/CmdE.c b/commands/CmdE.c index 6f9f7912..0054fdf7 100644 --- a/commands/CmdE.c +++ b/commands/CmdE.c @@ -1085,9 +1085,9 @@ CmdExtract(w, cmd) /* argv[2] is a halo distance */ dist = cmdParseCoord(w, argv[2], TRUE, TRUE); - if (dist <= 0) + if (dist < 0) { - TxError("Bad halo distance. Halo must be strictly positive."); + TxError("Bad halo distance. Halo must be non-negative."); return; } else diff --git a/extract/ExtCouple.c b/extract/ExtCouple.c index c4c433c1..f883d88e 100644 --- a/extract/ExtCouple.c +++ b/extract/ExtCouple.c @@ -1180,7 +1180,7 @@ extSideOverlapHalo(tp, esws) } if (rtp != rbp) { - efflength = (cfrac * (double)length) * (1.0 - sov.so_coupfrac); + efflength = (cfrac - sov.so_coupfrac) * (double)length; cap += e->ec_cap * efflength; subfrac += sov.so_subfrac; /* Just add the shielded fraction */ @@ -1209,7 +1209,7 @@ extSideOverlapHalo(tp, esws) if (DBIsContact(outtype)) outtype = DBPlaneToResidue(outtype, esws->plane_of_boundary); - efflength = (sfrac * (double)length) * (1.0 - subfrac); + efflength = (sfrac - subfrac) * (double)length; subcap = ExtCurStyle->exts_perimCap[ta][0] * efflength; rbp->nreg_cap -= subcap; /* Ignore residual error at ~zero zeptoFarads. Probably */