From ad500d086dc3bfab1d1190c479bbe2b657789c5b Mon Sep 17 00:00:00 2001 From: Ben McDonald Date: Fri, 13 Jun 2025 10:05:48 -0700 Subject: [PATCH] Fix xname numbering --- cmd/pdu-collect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/pdu-collect.go b/cmd/pdu-collect.go index 55a9e2e..0c53e03 100644 --- a/cmd/pdu-collect.go +++ b/cmd/pdu-collect.go @@ -27,7 +27,7 @@ func transformToSMDFormat(inventory *pdu.PDUInventory) []map[string]any { var pValue int 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)