Fix xname numbering

This commit is contained in:
Ben McDonald 2025-06-13 10:05:48 -07:00
parent 940e7fee2a
commit ad500d086d
No known key found for this signature in database

View file

@ -27,7 +27,7 @@ func transformToSMDFormat(inventory *pdu.PDUInventory) []map[string]any {
var pValue int var pValue int
if len(letterPart) > 1 { if len(letterPart) > 1 {
pValue = int(unicode.ToUpper(rune(letterPart[1])) - 'A') pValue = int(unicode.ToUpper(rune(letterPart[0])) - 'A')
} }
idSuffix := fmt.Sprintf("p%dv%s", pValue, numberPart) idSuffix := fmt.Sprintf("p%dv%s", pValue, numberPart)