Skip to content

Commit c2c75a2

Browse files
committed
fix table reading
1 parent 1474860 commit c2c75a2

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

CathodeLib/Scripts/CATHODE/Commands/Helpers/CustomTable.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,15 @@ public override void Read(BinaryReader reader)
516516
bool hasUnlinkedPins = reader.ReadBoolean();
517517
if (hasUnlinkedPins)
518518
{
519-
FlowgraphMeta.NodeMeta.UnlinkedPinMeta pin = new FlowgraphMeta.NodeMeta.UnlinkedPinMeta();
520-
pin.ParameterGUID = Utilities.Consume<ShortGuid>(reader);
521-
pin.PinLocation = reader.ReadByte();
522-
pin.PinStyle = reader.ReadByte();
523-
node.UnlinkedPins.Add(pin);
519+
int unlinkedCount = reader.ReadInt32();
520+
for (int z = 0; z < unlinkedCount; z++)
521+
{
522+
FlowgraphMeta.NodeMeta.UnlinkedPinMeta pin = new FlowgraphMeta.NodeMeta.UnlinkedPinMeta();
523+
pin.ParameterGUID = Utilities.Consume<ShortGuid>(reader);
524+
pin.PinLocation = reader.ReadByte();
525+
pin.PinStyle = reader.ReadByte();
526+
node.UnlinkedPins.Add(pin);
527+
}
524528
}
525529

526530
flowgraph.Nodes.Add(node);

0 commit comments

Comments
 (0)