Skip to content

Commit

Permalink
Fixed bug for special case in reader that was uncovered while impleme…
Browse files Browse the repository at this point in the history
…nting a writer fix. When a data packet contains only a single partial point advance() reads zero points and another call is needed.
  • Loading branch information
cry-inc committed Aug 17, 2024
1 parent 99b5d44 commit ab7c6ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pc_reader_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ impl<'a, T: Read + Seek> Iterator for PointCloudReaderRaw<'a, T> {
}

// Refill property queues if required
if self.queue_reader.available() < 1 {
// (in some corner cases more than one advance is required)
while self.queue_reader.available() < 1 {
if let Err(err) = self.queue_reader.advance() {
return Some(Err(err));
}
Expand Down

0 comments on commit ab7c6ea

Please sign in to comment.