Skip to content

Commit

Permalink
Fix benchmark print_number infinite loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaxwell committed Apr 24, 2017
1 parent 8b7680a commit a2b6b19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void print_number(double x) {
if (y < 0.0) {
y = -y;
}
while (y < 100.0) {
while (y > 0 && y < 100.0) {
y *= 10.0;
c++;
}
Expand Down

0 comments on commit a2b6b19

Please sign in to comment.