generator: make sure not to return data unseeded
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8f0f29d190
commit
a1beb2893d
@ -138,6 +138,9 @@ auto Generator::generate_blocks(unsigned int k_blocks) -> std::string {
|
||||
std::lock_guard<std::recursive_mutex> lg(mtx);
|
||||
|
||||
assert((G.ctr != 0) && "Counter is not 0, generator has been seeded");
|
||||
if (!this->is_seeded()) {
|
||||
throw std::logic_error("G.ctr == 0, generator has not been seeded!");
|
||||
}
|
||||
|
||||
std::string r{""};
|
||||
while (k_blocks--) {
|
||||
|
Reference in New Issue
Block a user