use local variable for fieldBuffer because on some arch (Moxa ARM5) 64 bit (double) values are corrupted otherwise

This commit is contained in:
2016-04-07 11:05:51 +02:00
parent 74775996db
commit b37fad41c6

View File

@ -115,7 +115,6 @@ class Stream : protected StreamCore
epicsMutex mutex; epicsMutex mutex;
epicsEvent initDone; epicsEvent initDone;
#endif #endif
StreamBuffer fieldBuffer;
int status; int status;
int convert; int convert;
long currentValueLength; long currentValueLength;
@ -990,6 +989,7 @@ formatValue(const StreamFormat& format, const void* fieldaddress)
{ {
// Format like "%([record.]field)..." has requested to get value // Format like "%([record.]field)..." has requested to get value
// from field of this or other record. // from field of this or other record.
StreamBuffer fieldBuffer;
DBADDR* pdbaddr = (DBADDR*)fieldaddress; DBADDR* pdbaddr = (DBADDR*)fieldaddress;
/* Handle time stamps special. %T converter takes double. */ /* Handle time stamps special. %T converter takes double. */
@ -1134,6 +1134,7 @@ matchValue(const StreamFormat& format, const void* fieldaddress)
{ {
// Format like "%([record.]field)..." has requested to put value // Format like "%([record.]field)..." has requested to put value
// to field of this or other record. // to field of this or other record.
StreamBuffer fieldBuffer;
DBADDR* pdbaddr = (DBADDR*)fieldaddress; DBADDR* pdbaddr = (DBADDR*)fieldaddress;
long nord; long nord;
long nelem = pdbaddr->no_elements; long nelem = pdbaddr->no_elements;