From 6058a0e24371947063ce7f10e16037a7d7be72b3 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Mon, 31 May 2021 16:13:36 -0700 Subject: [PATCH] [obs] fix oob cursor writes --- obs/lg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obs/lg.c b/obs/lg.c index 0664ec05..5938afd7 100644 --- a/obs/lg.c +++ b/obs/lg.c @@ -244,7 +244,7 @@ static void * pointerThread(void * data) const uint32_t * s = (const uint32_t *)data; uint32_t * d = this->cursorData; - for(int i = 0; i < dataSize; ++i, ++s, ++d) + for(int i = 0; i < dataSize / sizeof(uint32_t); ++i, ++s, ++d) *d = (*s & ~0xFF000000) | (*s & 0xFF000000 ? 0x0 : 0xFF000000); break; }