From f86cf730e9538335935962a66702a690f87ff2e6 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 27 Jan 2012 09:41:37 -0600 Subject: [PATCH] db: fix dbpf to enum from integer bug --- src/db/dbTest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/dbTest.c b/src/db/dbTest.c index 32733fe4d..84cc23e48 100644 --- a/src/db/dbTest.c +++ b/src/db/dbTest.c @@ -317,7 +317,7 @@ long epicsShareAPI dbpf(const char *pname,const char *pvalue) if (nameToAddr(pname, &addr)) return -1; /* For enumerated types must allow for ENUM rather than string*/ /* If entire field is digits then use DBR_ENUM else DBR_STRING*/ - if (addr.dbr_field_type == DBR_ENUM && !*pvalue && + if (addr.dbr_field_type == DBR_ENUM && *pvalue && strspn(pvalue,"0123456789") == strlen(pvalue)) { unsigned short value;