From 42d06d6a38fd08d49daa28e782525393b5c8d82c Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Sun, 29 Aug 2021 07:25:14 -0700 Subject: [PATCH] Fix bugs in dbRecordNameValidate() --- modules/database/src/ioc/dbStatic/dbLexRoutines.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/database/src/ioc/dbStatic/dbLexRoutines.c b/modules/database/src/ioc/dbStatic/dbLexRoutines.c index 525846186..13af8de3e 100644 --- a/modules/database/src/ioc/dbStatic/dbLexRoutines.c +++ b/modules/database/src/ioc/dbStatic/dbLexRoutines.c @@ -1063,7 +1063,7 @@ int dbRecordNameValidate(const char *name) } for(; *pos; i++, pos++) { - char c = *pos; + unsigned char c = *pos; if(i==0) { /* first character restrictions */ if(c=='-' || c=='+' || c=='[' || c=='{') { @@ -1072,8 +1072,8 @@ int dbRecordNameValidate(const char *name) } /* any character restrictions */ if(c < ' ') { - errlogPrintf("Warning: Record/Alias name '%s' should not contain non-printable 0x%02u\n", - name, (unsigned)c); + errlogPrintf("Warning: Record/Alias name '%s' should not contain non-printable 0x%02x\n", + name, c); } else if(c==' ' || c=='\t' || c=='"' || c=='\'' || c=='.' || c=='$') { epicsPrintf("Error: Bad character '%c' in Record/Alias name \"%s\"\n",