From cf02abd8002f86c7563986ec25034e1504906a71 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Mon, 6 Nov 2023 21:54:40 +0000 Subject: [PATCH] negative modulo blah --- src/Apps/Tools/ColorTester.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Apps/Tools/ColorTester.cpp b/src/Apps/Tools/ColorTester.cpp index d0af0f9..b569a81 100644 --- a/src/Apps/Tools/ColorTester.cpp +++ b/src/Apps/Tools/ColorTester.cpp @@ -301,7 +301,7 @@ int main(int argc, char** argv) r_window->EnableRelativeMouse(false); - int32_t currentImageIdx = 0; + uint32_t currentImageIdx = 0; auto t1 = Time::now(); auto startTime = Time::now(); uint32_t frameCounter = 0; @@ -319,7 +319,7 @@ int main(int argc, char** argv) else if (handler.getFirst(Input::ButtonCodes::Key_Left)) currentImageIdx--; - currentImageIdx = currentImageIdx % totalImageCount; + currentImageIdx = (currentImageIdx + totalImageCount) % totalImageCount; bool currentImageIsHDR = imageIsHDR[currentImageIdx];