+ // avoid infinite loop when Bad assumption was made on illegal 'unknown length' UN //JPRx
+
+ if (offsetStartCurrentSQItem <= OffsetOfPreviousParseDES)
+ {
+ gdcmWarningMacro("Bad assumption was made on illegal 'unknown length' UN!" << std::endl <<
+ "OffsetOfPreviousParseDES " << std::hex << OffsetOfPreviousParseDES
+ << " offsetStartCurrentSQItem " << offsetStartCurrentSQItem);
+ /// \todo when "Bad assumption (SQ) on illegal 'unknown length' UN", Backtrack again + try OB
+ return false;
+ }
+ else
+ {
+ OffsetOfPreviousParseDES = offsetStartCurrentSQItem;
+ }
+