Commit e3e6345e authored by David Venhoek's avatar David Venhoek
Browse files

Simple fix to stop Map from crashing on credentials that have too few attributes for their type.

parent d14a7d11
......@@ -85,7 +85,11 @@ func (al *AttributeList) Map(conf *Configuration) map[AttributeTypeIdentifier]Tr
ct := conf.CredentialTypes[ctid]
for i := range ct.AttributeTypes {
attrid := ct.AttributeTypes[i].GetAttributeTypeIdentifier()
al.attrMap[attrid] = strings[i]
if i < len(strings) {
al.attrMap[attrid] = strings[i]
} else {
al.attrMap[attrid] = nil
}
}
}
return al.attrMap
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment