From 0ec95fe1d7d38f6e9b58acccca7bfe4693c332ba Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Wed, 9 Aug 2000 13:51:08 +0000 Subject: [PATCH] MODULO bug (range was limited to short int) fixed. --- src/libCom/calcPerform.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libCom/calcPerform.c b/src/libCom/calcPerform.c index a9a84db14..38442f385 100644 --- a/src/libCom/calcPerform.c +++ b/src/libCom/calcPerform.c @@ -131,7 +131,6 @@ epicsShareFunc long epicsShareAPI double *pstacktop; /* stack of values */ double stack[80]; short temp1; - short i; double *top; int itop; /* integer top value */ int inexttop; /* ineteger next to top value */ @@ -143,7 +142,7 @@ epicsShareFunc long epicsShareAPI pstacktop = &stack[0]; /* DEBUG print statements -for (i=0;i<184;i++){ +for (short i=0;i<184;i++){ printf ("%d_",post[i]); if ( post[i] == END_STACK ) break; if ( post[i] == 71 ) i=i+8; @@ -334,8 +333,7 @@ printf ("*FINISHED*\n"); inexttop = (int)*(pstacktop+1); if (inexttop == 0) return(-1); - i = itop % inexttop; - *pstacktop = i; + *pstacktop = itop % inexttop; break; case REL_OR: