Fix a memory leak caused by the constness of the exceptionCause string in Yerbacon::Exception

This commit is contained in:
Username404 2021-09-25 17:34:41 +02:00
parent 659cdf4e80
commit c696b440e7
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1

View File

@ -18,7 +18,7 @@
namespace Yerbacon { namespace Yerbacon {
consteval const char* getVersion() noexcept { return YBCON_VERSION; } consteval const char* getVersion() noexcept { return YBCON_VERSION; }
class Exception: public std::exception { class Exception: public std::exception {
const std::string exceptionCause; std::string exceptionCause;
public: public:
[[nodiscard]] const char* what() const noexcept final { [[nodiscard]] const char* what() const noexcept final {
return exceptionCause.data(); return exceptionCause.data();