fix: reject DXF files missing EOF marker

Add regression coverage for issue #1.
This commit is contained in:
eglee committed 2026-10-28 15:35:18 +09:00
1 parent 9df1bcfc2a
commit 2e4eca5e07
2 files changed
+10

No files matched your search

+2
View File
@@ -51,6 +51,8 @@ def read_dxf_bytes(raw):
current['section'] = section
if current:
records.append(current)
if not records or records[-1]['type'] != 'EOF' or records[-1]['tags']:
raise ValueError('DXF 종료 표시(EOF)가 없습니다. 파일이 끝까지 저장되었는지 확인해 주세요.')
entities = [r for r in records if r['section'] == 'ENTITIES']
blocks, block = {}, None
for record in records: