summary refs log tree commit diff stats
path: root/hw/adb.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/adb.c')
-rw-r--r--hw/adb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/adb.c b/hw/adb.c
index 6442d796b6..2d230a697e 100644
--- a/hw/adb.c
+++ b/hw/adb.c
@@ -63,8 +63,8 @@ void adb_receive_packet(ADBBusState *s, const uint8_t *buf, int len)
     int devaddr, cmd, i;
     uint8_t obuf[4];
 
-    cmd = buf[1] & 0xf;
-    devaddr = buf[1] >> 4;
+    cmd = buf[0] & 0xf;
+    devaddr = buf[0] >> 4;
     if (buf[1] == ADB_BUSRESET) {
         obuf[0] = 0x00;
         obuf[1] = 0x00;