From 26539e79b611f828dfcdb3375584670078974a0c Mon Sep 17 00:00:00 2001 From: Christoph Haag Date: Sat, 9 May 2020 21:13:19 +0200 Subject: [PATCH] ipc: Fix looking up tracking origins Fixes #78 --- src/xrt/ipc/ipc_server_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xrt/ipc/ipc_server_process.c b/src/xrt/ipc/ipc_server_process.c index 8607cf941..1d0dbce37 100644 --- a/src/xrt/ipc/ipc_server_process.c +++ b/src/xrt/ipc/ipc_server_process.c @@ -203,11 +203,11 @@ init_shm(struct ipc_server *s) // Setup the tracking origin. idev->tracking_origin_index = (uint32_t)-1; for (size_t k = 0; k < IPC_SERVER_NUM_XDEVS; k++) { - if (xdev->tracking_origin != s->xtracks[i]) { + if (xdev->tracking_origin != s->xtracks[k]) { continue; } - idev->tracking_origin_index = i; + idev->tracking_origin_index = k; break; }