-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pv): fix locally a division by zero occuring in Proverif
This division by zero occurs when proverif is ran from a non-TTY.
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff proverif2.05/src/display.ml proverif2.05/src/display.ml | ||
index c43785ec..2763d907 100644 | ||
--- proverif/src/display.ml | ||
+++ proverif/src/display.ml | ||
@@ -49,7 +49,7 @@ let dynamic_display str = | ||
then display_whitespace (!record_cursor_line - size); | ||
(* If we cannot determine the number of columns, we just assume that the statistics | ||
will fit on one line (the statistics will not be active by default) *) | ||
- let lines = if columns = -1 then 0 else ((max (!record_cursor_line) size) - 1) / columns in | ||
+ let lines = if columns <= 0 then 0 else ((max (!record_cursor_line) size) - 1) / columns in | ||
(* Go to the beginning of the line *) | ||
print_string "\r"; | ||
if lines > 0 then |