summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/common/sim_tasks.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/uisimulator/common/sim_tasks.c b/uisimulator/common/sim_tasks.c
index 8c1f193080..c53b9990fd 100644
--- a/uisimulator/common/sim_tasks.c
+++ b/uisimulator/common/sim_tasks.c
@@ -92,7 +92,9 @@ void sim_thread(void)
last_broadcast_tick = current_tick;
}
- num_acks_to_expect += queue_broadcast(SYS_USB_CONNECTED, 0) - 1;
+ /* NOTE: Unlike the USB code, we do not subtract one here
+ * because the sim_queue is not registered for broadcasts! */
+ num_acks_to_expect += queue_broadcast(SYS_USB_CONNECTED, 0);
DEBUGF("USB inserted. Waiting for %d acks...\n",
num_acks_to_expect);
break;