Constant arrary input links of size 1 don't work
Bug #1882520 reported by
Dirk Zimoch
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Fix Released
|
Undecided
|
Dirk Zimoch |
Bug Description
Constant input links in array form with 1 element don't work and return an empty array.
Example:
field (INP, [42])
As soon as a comma is present, it works:
field (INP, [42,])
Related branches
~dirk.zimoch/epics-base:fix_one_element_input_link_arrays
Merged
into
~epics-core/epics-base/+git/epics-base:7.0
at
revision 68121ec907b0c0f91aec1155b0d78b5b76ec3282
- Andrew Johnson: Approve
-
Diff: 14 lines (+1/-2)1 file modifiedmodules/database/src/ioc/dbStatic/dbStaticLib.c (+1/-2)
Changed in epics-base: | |
assignee: | nobody → Dirk Zimoch (dirk.zimoch) |
status: | New → In Progress |
summary: |
- Constant arrar input links of size 1 don't work + Constant arrary input links of size 1 don't work |
Changed in epics-base: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
The problem is in dbStaticLib.c line 2334 (dbParseLink):
/* Link may be an array constant */
(strchr( pstr, ',') || strchr(pstr, '"'))) {
pinfo- >ltype = CONSTANT;
if (pstr[0] == '[' && pstr[len-1] == ']' &&
return 0;
}
This demands that arrays contain at least one comma or quote. So 1 element string arrays are ok but one element numeric arrays not? Why?
[42] and [] sould be are valid arrays.