From 9d6d137b50a6c6c26c0230069f930c5bb6fb4cea Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 24 Jan 2020 16:31:03 +1100 Subject: [PATCH] [c-host] fix bounds checking on frame index --- VERSION | 2 +- c-host/src/app.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 94380469..2aa7afb7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B1-104-gc7aa8871e4+1 \ No newline at end of file +B1-105-ga75b95694b+1 \ No newline at end of file diff --git a/c-host/src/app.c b/c-host/src/app.c index 01386042..67d422f0 100644 --- a/c-host/src/app.c +++ b/c-host/src/app.c @@ -160,7 +160,7 @@ static int frameThread(void * opaque) // we increment the index first so that if we need to repeat a frame // the index still points to the latest valid frame - if (app.frameIndex++ == LGMP_Q_FRAME_LEN) + if (++app.frameIndex == LGMP_Q_FRAME_LEN) app.frameIndex = 0; KVMFRFrame * fi = lgmpHostMemPtr(app.frameMemory[app.frameIndex]);