fix dbr size of empty arrays. Fixes caget returning non 0 in first element

This commit is contained in:
2020-06-05 11:00:58 +02:00
parent 786c4c2ca2
commit 8cc20393f1

View File

@@ -516,7 +516,7 @@ struct dbr_ctrl_double{
};
#define dbr_size_n(TYPE,COUNT)\
((unsigned)((COUNT)<=0?dbr_size[TYPE]:dbr_size[TYPE]+((COUNT)-1)*dbr_value_size[TYPE]))
((unsigned)((COUNT)<0?dbr_size[TYPE]:dbr_size[TYPE]+((COUNT)-1)*dbr_value_size[TYPE]))
/* size for each type - array indexed by the DBR_ type code */
LIBCA_API extern const unsigned short dbr_size[];