From 99788c5545e61997c05ec5c4b5d488387657ce03 Mon Sep 17 00:00:00 2001 From: Rustam Safargalin Date: Tue, 9 Nov 2021 09:38:01 +0300 Subject: [PATCH] Fix inputs and outputs limitation --- src/filter/graph.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/filter/graph.rs b/src/filter/graph.rs index 1654e6e1..b63cd6cb 100644 --- a/src/filter/graph.rs +++ b/src/filter/graph.rs @@ -161,7 +161,13 @@ impl<'a> Parser<'a> { if self.inputs.is_null() { self.inputs = input; } else { - (*self.inputs).next = input; + let mut prev_input = self.inputs; + let mut next_input = (*prev_input).next; + while !next_input.is_null() { + prev_input = next_input; + next_input = (*next_input).next; + } + (*prev_input).next = input; } } @@ -187,7 +193,13 @@ impl<'a> Parser<'a> { if self.outputs.is_null() { self.outputs = output; } else { - (*self.outputs).next = output; + let mut prev_output = self.outputs; + let mut next_output = (*prev_output).next; + while !next_output.is_null() { + prev_output = next_output; + next_output = (*next_output).next; + } + (*prev_output).next = output; } }