Skip to content

Commit 5ceb422

Browse files
committed
assemble: Do not crash when a file uses no registers
1 parent 020499a commit 5ceb422

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tttool.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,7 @@ ttYaml2tt dir (TipToiYAML {..}) = do
15191519
-- resolve registers
15201520
let (initRegs, scripts) = resolveRegs (preInitRegs, map ($ filename_lookup) prescripts)
15211521

1522-
let maxReg = maximum
1522+
let maxReg = maximum $ 0:
15231523
[ r
15241524
| (_, Just ls) <- scripts
15251525
, Line _ cs as _ <- ls

0 commit comments

Comments
 (0)