diff --git a/path-utils/src/lib.rs b/path-utils/src/lib.rs index 405c1253..cf8688fd 100644 --- a/path-utils/src/lib.rs +++ b/path-utils/src/lib.rs @@ -181,7 +181,10 @@ impl<'a> Iterator for PathBufferStream<'a> { let subpath = &self.path_buffer.subpaths[self.subpath_index as usize]; if self.endpoint_index == subpath.last_endpoint_index { self.subpath_index += 1; - return Some(PathCommand::ClosePath) + if subpath.closed { + return Some(PathCommand::ClosePath) + } + return self.next() } let endpoint_index = self.endpoint_index;