Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Nov 28, 2020
1 parent 528728b commit 76d4dba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testament/testament.nim
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ proc codegenCheck(test: TTest, target: TTarget, spec: TSpec, expectedMsg: var st
let genFile = generatedFile(test, target)
let contents = readFile(genFile).string
for check in spec.ccodeCheck:
if check[0] == '\\':
if check.len > 0 and check[0] == '\\':
# little hack to get 'match' support:
if not contents.match(check.peg):
given.err = reCodegenFailure
Expand Down

0 comments on commit 76d4dba

Please sign in to comment.