Skip to content

Commit dfb497b

Browse files
committed
Explicitly error out if magic number is too recent
1 parent 3ade019 commit dfb497b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stagpy/stagyyparsers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ def _legacy_header(
402402
sfield = True
403403

404404
magic %= 100
405-
if magic < 9:
406-
raise ParsingError(filepath, "magic < 9 not supported")
405+
if magic < 9 or magic > 11:
406+
raise ParsingError(filepath, f"{magic=} not supported")
407407

408408
header_info = _HeaderInfo(magic, nval, sfield, readbin, {})
409409
header = header_info.header

0 commit comments

Comments
 (0)