https://github.com/Qalculate/libqalculate/commit/b56d623ada9cdd2aeac73b66ab839c9cd5bdd239

From b56d623ada9cdd2aeac73b66ab839c9cd5bdd239 Mon Sep 17 00:00:00 2001
From: "Hanna K." <hanna.knutsson@protonmail.com>
Date: Thu, 17 Jul 2025 15:54:15 +0200
Subject: [PATCH] Fix segfault with text argument containing potential text
 returning function, or variable containing text value (issue #813)

--- a/libqalculate/Function.cc
+++ b/libqalculate/Function.cc
@@ -1763,7 +1763,7 @@ void Argument::parse(MathStructure *mstruct, const string &str, const ParseOptio
 			if((mstruct->isVariable() && mstruct->variable()->isKnown() && ((KnownVariable*) mstruct->variable())->get().isSymbolic()) || (mstruct->isFunction() && (mstruct->function()->subtype() == SUBTYPE_USER_FUNCTION || mstruct->function()->subtype() == SUBTYPE_DATA_SET || mstruct->function()->id() == FUNCTION_ID_REGISTER || mstruct->function()->id() == FUNCTION_ID_STACK || mstruct->function()->id() == FUNCTION_ID_LOAD || mstruct->function()->id() == FUNCTION_ID_CHAR || mstruct->function()->id() == FUNCTION_ID_CONCATENATE || mstruct->function()->id() == FUNCTION_ID_COMPONENT || mstruct->function()->id() == FUNCTION_ID_BINARY_DECIMAL || mstruct->function()->id() == FUNCTION_ID_BIJECTIVE || mstruct->function()->id() == FUNCTION_ID_ROMAN || ((mstruct->function()->id() == FUNCTION_ID_BIN || mstruct->function()->id() == FUNCTION_ID_OCT || mstruct->function()->id() == FUNCTION_ID_DEC || mstruct->function()->id() == FUNCTION_ID_HEX || mstruct->function()->id() == FUNCTION_ID_BASE) && mstruct->size() > 0 && mstruct->last().isOne())))) {
 				EvaluationOptions eo;
 				eo.parse_options = po;
-				MathStructure mtest(mstruct);
+				MathStructure mtest(*mstruct);
 				CALCULATOR->beginTemporaryStopMessages();
 				mtest.eval(eo);
 				CALCULATOR->endTemporaryStopMessages();
