Diff between 47d4e6cb62992134cc5388ad6195667c4b25502a and 125af7e120a3b92616d5e2525290ea9a73f89429

Changed Files

File Additions Deletions Status
emulator/btdev.c +2 -2 modified

Full Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index b763c73..a42cb76 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -680,8 +680,8 @@ static void send_cmd(struct btdev *btdev, uint8_t evt, uint16_t opcode,
 		iov2[2 + i].iov_len = iov[i].iov_len;
 	}
 
-	if (run_hooks(btdev, BTDEV_HOOK_POST_CMD, opcode, iov[i].iov_base,
-								iov[i].iov_len))
+	if (run_hooks(btdev, BTDEV_HOOK_POST_CMD, opcode, iov[i -1].iov_base,
+							iov[i -1].iov_len))
 		send_packet(btdev, iov2, 2 + iovlen);
 }