From e7ca3db4dea38f08534d39be7f5cebbd4999c351 Mon Sep 17 00:00:00 2001 From: Stephan Oostveen Date: Tue, 23 Mar 2021 20:55:04 +0100 Subject: [PATCH] Bug: JKMathParser exception return local variable Fix the what() function which returned a pointer to a local variable. --- lib/jkqtcommon/jkqtpmathparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jkqtcommon/jkqtpmathparser.cpp b/lib/jkqtcommon/jkqtpmathparser.cpp index 6523590ebe..68c725621b 100644 --- a/lib/jkqtcommon/jkqtpmathparser.cpp +++ b/lib/jkqtcommon/jkqtpmathparser.cpp @@ -1889,7 +1889,7 @@ std::string JKQTPMathParser::jkmpException::getMessage() const { } const char *JKQTPMathParser::jkmpException::what() const noexcept { - return getMessage().c_str(); + return errormessage.c_str(); } JKQTPMathParser *JKQTPMathParser::jkmpNode::getParser(){ return parser; }