diff --git a/lokimq/lokimq.cpp b/lokimq/lokimq.cpp index 89a2e87..c1d23e6 100644 --- a/lokimq/lokimq.cpp +++ b/lokimq/lokimq.cpp @@ -372,7 +372,7 @@ LokiMQ::LokiMQ( // Verify the pubkey. We could get by with taking just the privkey and just generate this // for ourselves, but this provides an extra check to make sure we and the caller agree // cryptographically (e.g. to make sure they don't pass us an ed25519 keypair by mistake) - std::string verify_pubkey{crypto_box_PUBLICKEYBYTES, 0}; + std::string verify_pubkey(crypto_box_PUBLICKEYBYTES, 0); crypto_scalarmult_base(reinterpret_cast(&verify_pubkey[0]), reinterpret_cast(&privkey[0])); if (verify_pubkey != pubkey) throw std::invalid_argument("Invalid pubkey/privkey values given to LokiMQ construction: pubkey verification failed");