From d69a807ce324429b9dcc3628096bcaf6549b1ef0 Mon Sep 17 00:00:00 2001 From: Bobbe Date: Mon, 9 Dec 2024 23:25:39 +0100 Subject: [PATCH] Fix possible index error in remove_blender_name_suffix --- pcb2blender_importer/materials.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcb2blender_importer/materials.py b/pcb2blender_importer/materials.py index 0248119..1b202b0 100644 --- a/pcb2blender_importer/materials.py +++ b/pcb2blender_importer/materials.py @@ -75,7 +75,7 @@ def enhance_materials(materials): mat4cad_mat.setup_node_tree(node_tree) def remove_blender_name_suffix(name: str): - if name[-4] != ".": + if name[-4:-3] != ".": return name prefix, suffix = name.rsplit(".", 1)