From 0549d16faabb594b1df38c401001354983a025a9 Mon Sep 17 00:00:00 2001 From: Robin Eklind Date: Mon, 6 Jan 2025 15:38:06 +0100 Subject: [PATCH] themes: add BUGFIX for TFit_Obj5 The first valid location is always returned, regardless of the value of the random iteration count (r). This is due to the fact that found is true when a valid location has been located, and the (xp, yp)-coordinate is only updated if !found. --- Source/themes.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/themes.cpp b/Source/themes.cpp index 629979556..e0eca0146 100644 --- a/Source/themes.cpp +++ b/Source/themes.cpp @@ -137,6 +137,10 @@ BOOL TFit_Obj5(int t) continue; } + // BUGFIX: the first valid location is always returned, regardless of the + // value of the random iteration count (r). This is due to the fact that + // found is true when a valid location has been located, and the + // (xp, yp)-coordinate is only updated if !found. r--; }