Skip to content

Commit

Permalink
Print MaxTermSize error message in InsertTerm
Browse files Browse the repository at this point in the history
Close #156.
  • Loading branch information
tueda committed Dec 13, 2016
1 parent ad84adf commit 3955fdf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sources/proces.c
Original file line number Diff line number Diff line change
Expand Up @@ -2525,7 +2525,11 @@ ComAct: if ( t < u ) do { *m++ = *t++; } while ( t < u );
}
}
*termout = WORDDIF(m,termout);
if ( (*termout)*((LONG)sizeof(WORD)) > AM.MaxTer ) goto InsCall;
if ( (*termout)*((LONG)sizeof(WORD)) > AM.MaxTer ) {
MLOCK(ErrorMessageLock);
MesPrint("Term too complex during substitution. MaxTermSize of %l is too small",AM.MaxTer);
goto InsCall2;
}
AT.WorkPointer = coef;
return(0);
}
Expand All @@ -2552,6 +2556,7 @@ ComAct: if ( t < u ) do { *m++ = *t++; } while ( t < u );

InsCall:
MLOCK(ErrorMessageLock);
InsCall2:
MesCall("InsertTerm");
MUNLOCK(ErrorMessageLock);
SETERROR(-1)
Expand Down

0 comments on commit 3955fdf

Please sign in to comment.