From e480cdb8ea53ad10a0ace832fc233d632214e3cd Mon Sep 17 00:00:00 2001 From: Jacob Becker Date: Wed, 15 Jun 2016 15:08:23 -0400 Subject: [PATCH] some files have larger PointDataRecordLengths than the minimum required --- smtk/extension/vtk/reader/vtkLASReader.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/smtk/extension/vtk/reader/vtkLASReader.cxx b/smtk/extension/vtk/reader/vtkLASReader.cxx index 205304c0f3..89f20fa25b 100644 --- a/smtk/extension/vtk/reader/vtkLASReader.cxx +++ b/smtk/extension/vtk/reader/vtkLASReader.cxx @@ -267,13 +267,13 @@ int vtkLASReader::ReadHeaderBlock() fin.read(reinterpret_cast(&this->PointDataRecordLength), 2); vtkByteSwap::Swap2LE(&this->PointDataRecordLength); - if ((this->PointDataFormat == 0 && this->PointDataRecordLength != 20) || - (this->PointDataFormat == 1 && this->PointDataRecordLength != 28) || - (this->PointDataFormat == 2 && this->PointDataRecordLength != 26) || - (this->PointDataFormat == 3 && this->PointDataRecordLength != 34) || - this->PointDataFormat > 4) + if ((this->PointDataFormat == 0 && this->PointDataRecordLength < 20) || + (this->PointDataFormat == 1 && this->PointDataRecordLength < 28) || + (this->PointDataFormat == 2 && this->PointDataRecordLength < 26) || + (this->PointDataFormat == 3 && this->PointDataRecordLength < 34) || + this->PointDataFormat > 4) { - vtkErrorMacro("Invalid data format (" << this->PointDataFormat + vtkErrorMacro("Invalid data format (" << static_cast(this->PointDataFormat) << ") / record lengh (" << this->PointDataRecordLength << ") combo!"); return READ_ERROR; } -- GitLab