From 2c215967cda766c198cfc22fe46fecfceaa03058 Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 3 Feb 2022 03:14:55 +0100 Subject: [PATCH] fortuna: correctly decrement in moar_random_data() --- fortuna.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortuna.cpp b/fortuna.cpp index 60d8e0d..4549995 100644 --- a/fortuna.cpp +++ b/fortuna.cpp @@ -125,7 +125,7 @@ auto Fortuna::moar_random_data(const uint64_t& n_bytes) -> void { uint64_t remaining{n_bytes}; fmt::print(stderr, "[i] fortuna: remaining {} bytes\n", remaining); - while (--how_many_ops > 0) { + while (how_many_ops-- > 0) { this->random_data(Fortuna::two_pow_twenty); remaining -= Fortuna::two_pow_twenty; fmt::print(stderr, "[i] fortuna: remaining {} bytes\n", remaining);