rec: Fix calc & calcout get_precision()

This commit is contained in:
Andrew Johnson
2010-11-24 13:35:04 -06:00
parent 3ca705752a
commit 23c7e64490
2 changed files with 10 additions and 8 deletions
+5 -4
View File
@@ -159,12 +159,13 @@ static long get_units(DBADDR *paddr, char *units)
static long get_precision(DBADDR *paddr, long *pprecision)
{
calcRecord *prec = (calcRecord *)paddr->precord;
int fieldIndex = dbGetFieldIndex(paddr);
if (paddr->pfield == (void *)&prec->val) {
*pprecision = prec->prec;
} else {
*pprecision = prec->prec;
if (fieldIndex != calcRecordVAL)
recGblGetPrec(paddr, pprecision);
}
return 0;
}
+5 -4
View File
@@ -374,12 +374,13 @@ static long get_units(DBADDR *paddr, char *units)
static long get_precision(DBADDR *paddr, long *pprecision)
{
calcoutRecord *prec = (calcoutRecord *)paddr->precord;
int fieldIndex = dbGetFieldIndex(paddr);
if (paddr->pfield == (void *)&prec->val) {
*pprecision = prec->prec;
} else {
*pprecision = prec->prec;
if (fieldIndex != calcoutRecordVAL)
recGblGetPrec(paddr, pprecision);
}
return 0;
}