fix: layer override out of range, close #171

This commit is contained in:
Benny Megidish
2024-12-05 18:13:07 +02:00
parent 762794e025
commit 5f0dc0cb22
+7 -6
View File
@@ -425,12 +425,13 @@ class ProcessManager:
for key in keys + fallback_keys:
if footprint_has_field(footprint, key):
temp_layer = footprint_get_field(footprint, key)
if (temp_layer[0] == 'b' or temp_layer[0] == 'B'):
layer = "bottom"
break
elif (temp_layer[0] == 't' or temp_layer[0] == 'T'):
layer = "top"
break
if len(temp_layer) > 0:
if (temp_layer[0] == 'b' or temp_layer[0] == 'B'):
layer = "bottom"
break
elif (temp_layer[0] == 't' or temp_layer[0] == 'T'):
layer = "top"
break
return layer