From 4b0672914a96f8385df03a7a4b074b54ce61cd42 Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Fri, 10 Jul 1992 15:11:25 +0000 Subject: [PATCH] Increased dim of rpbuf to hold double constants in expression --- src/rec/recCalc.c | 5 +++-- src/util/calcTest.c | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/rec/recCalc.c b/src/rec/recCalc.c index 7cb9ca404..e5e533ab5 100644 --- a/src/rec/recCalc.c +++ b/src/rec/recCalc.c @@ -63,6 +63,7 @@ * .21 02-28-92 jba Changed get_precision,get_graphic_double,get_control_double * .22 02-28-92 jba ANSI C changes * .23 06-02-92 jba changed graphic/control limits for hihi,high,low,lolo + * .24 06-16-92 jba Increased dim of rpbuf to hold double constants in expression */ #include @@ -143,7 +144,7 @@ static long init_record(pcalc,pass) int i; double *pvalue; short error_number; - char rpbuf[80]; + char rpbuf[184]; if (pass==0) return(0); @@ -193,7 +194,7 @@ static long special(paddr,after) struct calcRecord *pcalc = (struct calcRecord *)(paddr->precord); int special_type = paddr->special; short error_number; - char rpbuf[80]; + char rpbuf[184]; if(!after) return(0); switch(special_type) { diff --git a/src/util/calcTest.c b/src/util/calcTest.c index 488b381f2..3e3c95630 100644 --- a/src/util/calcTest.c +++ b/src/util/calcTest.c @@ -30,6 +30,7 @@ * Modification Log: * ----------------- * .01 02-10-92 jba initial version + * .02 06-16-92 jba Increased dim of rpbuf to hold double constants in expression * */ @@ -133,7 +134,9 @@ int fieldCount; { long status=0; short error_number=0; - char rpbuf[80]; + /* rpbuf dimension must be >= 10*(dimension_of_CALC_field/2) */ + /* since each constant in the expression now takes 9 bytes (chars): 1(code)+8(double) */ + char rpbuf[184]; char valString[80]; double val;