Skip to content

Commit efd939a

Browse files
committed
only append tables when the first value is a float
1 parent b6e09ef commit efd939a

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Features:
1212
Bugfixes:
1313

1414
* skip empty values when restoring tables (#348)
15+
* only append to table when first value is a float
1516
* GUI send/receive config for objects in subpatches
1617

1718
0.15.0

hvcc/interpreters/pd2hv/PdParser.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,12 @@ def graph_from_canvas(
619619
g.add_error(f"Don't know how to parse line: {' '.join(line)}")
620620

621621
elif line[0] == "#A" and obj_array is not None:
622-
obj_array.obj_dict["values"].extend([float(f) for f in line[2:] if f != ""])
622+
# Test that we have an array continuation and extend the array values.
623+
try:
624+
float(line[1])
625+
obj_array.obj_dict["values"].extend([float(f) for f in line[2:] if f != ""])
626+
except ValueError:
627+
continue
623628

624629
else:
625630
g.add_error(f"Don't know how to parse line: {' '.join(line)}")

0 commit comments

Comments
 (0)