File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1686,16 +1686,21 @@ dxf_classes_read (Bit_Chain *restrict dat, Dwg_Data *restrict dwg)
1686
1686
klass = &dwg->dwg_class[i];
1687
1687
memset (klass, 0, sizeof (Dwg_Class));
1688
1688
if (pair != NULL && pair->code == 0 && pair->value.s
1689
- && strEQc (pair->value.s, "CLASS"))
1689
+ && ( strEQc (pair->value.s, "CLASS") || strEQc (pair->value.s, "ENDSEC") ))
1690
1690
{
1691
+ if (strEQc (pair->value.s, "ENDSEC"))
1692
+ {
1693
+ dxf_free_pair (pair);
1694
+ return 0;
1695
+ }
1691
1696
dxf_free_pair (pair);
1692
1697
pair = dxf_read_pair (dat);
1693
1698
if (!pair)
1694
1699
return 1;
1695
1700
}
1696
1701
else
1697
1702
{
1698
- LOG_ERROR ("2 CLASSES must be followed by 0 CLASS")
1703
+ LOG_ERROR ("2 CLASSES must be followed by 0 CLASS or ENDSEC ")
1699
1704
DXF_RETURN_EOF (DWG_ERR_INVALIDDWG);
1700
1705
return DWG_ERR_INVALIDDWG;
1701
1706
}
You can’t perform that action at this time.
0 commit comments