Sorry, a little mistake in my post: Must be '-' instead of '+':
diff -r1.2 -r1.4
22a23
> #include <limits.h>
466,467c467,473
< if (value >= 0.0)
< prec->rval = (epicsInt32)(value + 0.5) - prec->roff;
---
> if (value >= 0.0) {
> value -= (double)prec->roff - 0.5;
> if (value > (double)LONG_MAX)
> prec->rval = LONG_MAX;
> else
> prec->rval = (epicsInt32)value;
> }
Bernd
- References:
- ao record convert overflow Schoeneburg, Bernd
- Navigate by Date:
- Prev:
ao record convert overflow Schoeneburg, Bernd
- Next:
EPICS Meeting at FRIB Ralph Lange
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
- Navigate by Thread:
- Prev:
ao record convert overflow Schoeneburg, Bernd
- Next:
Re: ao record convert overflow Andrew Johnson
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
|