generator: add a meaningful assert message
All checks were successful
continuous-integration/drone/push Build is passing

should help with debugging...
This commit is contained in:
surtur 2021-11-16 00:17:16 +01:00
parent c82d3912f5
commit 85907e7178
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -99,7 +99,7 @@ auto Generator::do_crypto(int64_t k, unsigned __int128 ctr) -> std::string {
auto Generator::generate_blocks(unsigned int k_blocks) -> std::string {
G_state G = get_state();
assert (G.ctr!=0);
assert ((G.ctr!=0) && "Counter is not 0, generator has been seeded");
std::string r = "";
for (int i = 0; i < k_blocks; ++i) {
r += do_crypto(G.k, G.ctr);