From 1f726c876027894c78c1a18fe2f2de9eb04c288c Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 24 May 2016 12:01:38 +0200 Subject: [PATCH] Recognize arrays as constant links --- src/ioc/dbStatic/dbStaticLib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ioc/dbStatic/dbStaticLib.c b/src/ioc/dbStatic/dbStaticLib.c index db7a6a3f5..c718dacab 100644 --- a/src/ioc/dbStatic/dbStaticLib.c +++ b/src/ioc/dbStatic/dbStaticLib.c @@ -2330,6 +2330,12 @@ long dbParseLink(const char *str, short ftype, dbLinkInfo *pinfo) return 0; } + /* Link may be an array constant */ + if (pstr[0] == '[' && pstr[len-1] == ']' && strchr(pstr, ',')) { + pinfo->ltype = CONSTANT; + return 0; + } + pinfo->ltype = PV_LINK; pstr = strchr(pstr, ' '); /* find start of link modifiers (can't be seperated by tabs) */ if (pstr) {