From d72a2ef065b6b5b883c8f4ba66b77b77e5c6b5fc Mon Sep 17 00:00:00 2001 From: Ernie Pasveer Date: Mon, 23 Mar 2026 14:34:11 -0500 Subject: [PATCH] Fix latent bug with adding '&' or '*' to variable for visualizers. --- src/SeerVariableLoggerBrowserWidget.cpp | 3 +++ src/SeerVariableTrackerBrowserWidget.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/SeerVariableLoggerBrowserWidget.cpp b/src/SeerVariableLoggerBrowserWidget.cpp index 6f28db4..8b6a124 100644 --- a/src/SeerVariableLoggerBrowserWidget.cpp +++ b/src/SeerVariableLoggerBrowserWidget.cpp @@ -360,6 +360,9 @@ void SeerVariableLoggerBrowserWidget::handleContextMenu (const QPoint& pos) { } } + // Remove potential '&' and '*' characters at start of string. + variable.remove(QRegularExpression("^[\\*\\&]*")); + addMemoryVisualizerAction->setText(QString("\"%1\"").arg(actionText)); addMemoryAsteriskVisualizerAction->setText(QString("\"*%1\"").arg(actionText)); addMemoryAmpersandVisualizerAction->setText(QString("\"&&%1\"").arg(actionText)); diff --git a/src/SeerVariableTrackerBrowserWidget.cpp b/src/SeerVariableTrackerBrowserWidget.cpp index cf899d0..21f0422 100644 --- a/src/SeerVariableTrackerBrowserWidget.cpp +++ b/src/SeerVariableTrackerBrowserWidget.cpp @@ -608,6 +608,9 @@ void SeerVariableTrackerBrowserWidget::handleContextMenu (const QPoint& pos) { } } + // Remove potential '&' and '*' characters at start of string. + variable.remove(QRegularExpression("^[\\*\\&]*")); + addMemoryVisualizerAction->setText(QString("\"%1\"").arg(actionText)); addMemoryAsteriskVisualizerAction->setText(QString("\"*%1\"").arg(actionText)); addMemoryAmpersandVisualizerAction->setText(QString("\"&&%1\"").arg(actionText));