Skip to content

Commit

Permalink
geometry_gen:fabric_geometry: Fix indexing error for smaller fabrics
Browse files Browse the repository at this point in the history
Fix an indexing error in geometry generation that caused FABulous to crash when the fabric had fewer tiles on the Y axis than on the X axis.

Signed-off-by: Jonas K. <[email protected]>
  • Loading branch information
EverythingElseWasAlreadyTaken committed Jul 4, 2024
1 parent eae6d7d commit c798e5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geometry_generator/fabric_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def generateGeometry(self) -> None:
maxWidth = 0
maxSmRelX = 0
maxSmWidth = 0
for i in range(self.fabric.numberOfColumns):
for i in range(self.fabric.numberOfRows):
maxWidth = max(maxWidth, tileGeometries[i][j].width)
maxSmRelX = max(maxSmRelX, tileGeometries[i][j].smGeometry.relX)
maxSmWidth = max(maxSmWidth, tileGeometries[i][j].smGeometry.width)
Expand Down

0 comments on commit c798e5a

Please sign in to comment.