google-ipmi-i2c: Fix Deserialize request step header bytes variable
Need to use stepHdr instead of data. This error was added as part of
https://gerrit.openbmc-project.xyz/c/openbmc/google-ipmi-i2c/+/49673
Tested:
```
$ ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x02
79 2b 00 02 01 04 65 74 68 30
$ ipmitool raw 0x2e 0x02 0x79 0x2b 0x00 1 0 0xa0 0 1 15 0xa1 0 6
79 2b 00 51 75 61 6e 74 61
```
Change-Id: I0a43e17b1bd7382a72d4ea4d06aeb22a1afaf76d
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/i2c.cpp b/i2c.cpp
index 76e3e93..dfbb654 100644
--- a/i2c.cpp
+++ b/i2c.cpp
@@ -104,7 +104,7 @@
auto step = &req->step[req->numSteps++];
// Deserialize request step header bytes.
- uint8_t devAndDir = data[stepHeaderDevAndDir];
+ uint8_t devAndDir = stepHdr[stepHeaderDevAndDir];
uint8_t stepFlags = stepHdr[stepHeaderFlags];
step->length = stepHdr[stepHeaderParm];
bytesLeft -= stepHeaderLen;