psusensor: Restore previous Name numbering behavior

Restores previous decrement operation recently removed,
avoiding introducing an unintended change in behavior.
The reason for decrement is hwmon filenames are 1-based,
but the Name, Name1, Name2, etc. numbering is 0-based.
This fix preserves existing behavior,
avoiding surprise to other users of psusensor.

Tested: The hwmon file numbering now lines up with sensor names,
  as intended, and the configuration now parses as it did before,
  and the sensors are appearing once again on my machine.

Change-Id: I0b2b9a118b1fa7895d282308ecb29b4eb73bf435
Signed-off-by: Josh Lehan <krellan@google.com>
diff --git a/src/PSUSensorMain.cpp b/src/PSUSensorMain.cpp
index 8c052a7..1c76cef 100644
--- a/src/PSUSensorMain.cpp
+++ b/src/PSUSensorMain.cpp
@@ -412,6 +412,15 @@
             if (std::regex_search(labelHead, matches, rgx))
             {
                 nameIndex = std::stoi(matches[1]);
+
+                // Decrement to preserve alignment, because hwmon
+                // human-readable filenames and labels use 1-based numbering,
+                // but the "Name", "Name1", "Name2", etc. naming
+                // convention (the psuNames vector) uses 0-based numbering.
+                if (nameIndex > 0)
+                {
+                    --nameIndex;
+                }
             }
             else
             {