From fa169169977bfcf770b1f361dba0c3ebbc1acc05 Mon Sep 17 00:00:00 2001
From: Revar Desmera <revarbat@gmail.com>
Date: Thu, 3 Aug 2023 20:13:48 -0700
Subject: [PATCH] Textures linear_sweep() bugfix.

---
 skin.scad | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/skin.scad b/skin.scad
index 772478e..7797e77 100644
--- a/skin.scad
+++ b/skin.scad
@@ -3642,7 +3642,7 @@ function _textured_linear_sweep(
                                         mat = up((v-0.5)*h) *
                                               scale(sc) *
                                               zrot(twist*v)
-                                    ) apply(mat, tile_rows[texcnt.y-ti-1])
+                                    ) apply(mat, tile_rows[(texcnt.y-ti)%texcnt.y])
                                 ]
                             ) vnf_vertex_array(
                                 tiles, caps=false, style=style,