Skip to content

Commit

Permalink
Fix off-by-one in Havlak result verification.
Browse files Browse the repository at this point in the history
Before, if you used a parameter with no "canned result", you would get:
```
$ lua53 harness.lua Havlak 1 2
Starting Havlak benchmark ...
No verification result for 2 found
lua53: ./havlak.lua:640: bad argument #1 to 'format' (number expected, got nil)
```
  • Loading branch information
vext01 committed Feb 7, 2025
1 parent 2c09060 commit ee47bf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmarks/Lua/havlak.lua
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ function havlak:verify_result (result, inner_iterations)
return result[1] == 1605 and result[2] == 5213
else
print(('No verification result for %d found'):format(inner_iterations))
print(('Result is: %d, %d'):format(result[0], result[1]))
print(('Result is: %d, %d'):format(result[1], result[2]))
return false
end
end
Expand Down

0 comments on commit ee47bf5

Please sign in to comment.