mirror of
https://github.com/Brandon-Rozek/matmod.git
synced 2024-11-22 22:06:29 -05:00
Updated hack to adapt for custom connective behavior
This commit is contained in:
parent
646202cb50
commit
312e1aeda5
1 changed files with 6 additions and 3 deletions
|
@ -229,10 +229,13 @@ def parse_size(infile: SourceFile, first_run: bool) -> Optional[int]:
|
|||
"""
|
||||
Parse the line representing the matrix size.
|
||||
"""
|
||||
|
||||
size = int(next(infile))
|
||||
# HACK: The first size line may be -1 due to a bug. Skip it
|
||||
if size == -1 and first_run:
|
||||
size = int(next(infile))
|
||||
# HACK: When necessitation and custom connectives are enabled
|
||||
# MaGIC may produce -1s at the beginning of the file
|
||||
if first_run:
|
||||
while size == -1:
|
||||
size = int(next(infile))
|
||||
|
||||
if size == -1:
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue