Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions sources/grcc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ Model::Model(MInput *minp)
}
name = strdup(minp->name);
ncouple = minp->ncouple;
if (ncouple >= GRCC_MAXNCPLG) {
if (ncouple > GRCC_MAXNCPLG) {
erEnd("too many coupling constants in the model (GRCC_MAXNCPLG)");
}
// cnlist = minp->cnamlist;
Expand Down Expand Up @@ -2957,7 +2957,7 @@ SProcess::SProcess(Model *mdl, Process *prc, Options *opts, int sid, int *clst,
ok = False;
}
nNodes = nvrt + nExtern;
if (nNodes >= GRCC_MAXNODES) {
if (nNodes > GRCC_MAXNODES) {
if (prlevel > 0) {
grcc_fprintf(GRCC_Stderr, "*** SProcess::SProcess: ");
grcc_fprintf(GRCC_Stderr, "too many nodes = %d\n", nNodes);
Expand Down Expand Up @@ -3120,7 +3120,7 @@ SProcess::SProcess(Model *mdl, Process *prc, Options *opts, int sid, int *clst,
ok = False;
}
nNodes = nvrt + nExtern;
if (nNodes >= GRCC_MAXNODES) {
if (nNodes > GRCC_MAXNODES) {
if (prlevel > 0) {
grcc_fprintf(GRCC_Stderr, "*** SProcess::SProcess: ");
grcc_fprintf(GRCC_Stderr, "too many nodes = %d\n", nNodes);
Expand Down Expand Up @@ -10318,7 +10318,7 @@ void AStack::pushNode(int n)
erEnd("N-stack overflow (GRCC_MAXNSTACK)");
}
nc = agraph->nodes[n]->cand;
if (nc->nilist >= GRCC_MAXMINTERACT) {
if (nc->nilist > GRCC_MAXMINTERACT) {
erEnd("N-stack: too long list (GRCC_MAXMINTERACT)");
}
ns = nStack[nStackP];
Expand Down Expand Up @@ -10348,7 +10348,7 @@ void AStack::pushEdge(int e)
erEnd("E-stack overflow (GRCC_MAXESTACK)");
}
ec = agraph->edges[e]->cand;
if (ec->nplist >= GRCC_MAXMPARTICLES2) {
if (ec->nplist > GRCC_MAXMPARTICLES2) {
erEnd("E-stack: Too long list (GRCC_MAXMPARTICLES)");
}
es = eStack[eStackP];
Expand Down
4 changes: 2 additions & 2 deletions sources/grccparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#define GRCC_NAMESPACE
*/

#define GRCC_MAXNCPLG 4
#define GRCC_MAXLEGS 10
#define GRCC_MAXNCPLG 15
#define GRCC_MAXLEGS 15
#define GRCC_MAXMPARTICLES 50
#define GRCC_MAXMINTERACT 500
#define GRCC_MAXSUBPROCS 500
Expand Down
Loading