diff --git a/smtk/extension/vtk/reader/vtkLASReader.cxx b/smtk/extension/vtk/reader/vtkLASReader.cxx index 205304c0f3613fa07d1f1511471ac3711c1c0097..89f20fa25b73e6df147bcf58c8f4687e148765a1 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; }