Merge changes from 3.15 branch, to revno 12701

This commit is contained in:
Andrew Johnson
2015-08-20 11:24:07 -05:00
5 changed files with 64 additions and 48 deletions
+8 -3
View File
@@ -1099,14 +1099,19 @@ long dbGetAttributePart(DBENTRY *pdbentry, const char **ppname)
const char *pname = *ppname;
dbRecordAttribute *pattribute;
if (!precordType) return S_dbLib_recordTypeNotFound;
if (!precordType)
return S_dbLib_recordTypeNotFound;
pattribute = (dbRecordAttribute *)ellFirst(&precordType->attributeList);
while (pattribute) {
size_t nameLen = strlen(pattribute->name);
int compare = strncmp(pattribute->name, pname, nameLen);
int ch = pname[nameLen];
if (compare == 0) {
if (!(ch == '_' || isalnum(ch))) {
int ch = pname[nameLen];
if (ch != '_' && !isalnum(ch)) {
/* Any other character can't be in the attribute name */
pdbentry->pflddes = pattribute->pdbFldDes;
pdbentry->pfield = pattribute->value;
*ppname = &pname[nameLen];