Fix bugs in dbRecordNameValidate()

This commit is contained in:
2021-08-29 07:25:14 -07:00
committed by Michael Davidsaver
parent 21e7e4ddfb
commit 42d06d6a38

View File

@@ -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",