Skip to content

Commit a936b9c

Browse files
committed
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.
1 parent 6b7135c commit a936b9c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Source/themes.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,12 @@ BOOL TFit_Obj5(int t)
137137
continue;
138138
}
139139

140+
// BUGFIX: the first valid location is always returned, regardless of the
141+
// value of the random iteration count (r). This is due to the fact that
142+
// found is true when a valid location has been located, and the
143+
// (xp, yp)-coordinate is only updated if !found.
140144
r--;
145+
141146
}
142147

143148
themex = xp;

0 commit comments

Comments
 (0)