From 99296943146caf6025e3b16a2f198757074a534b Mon Sep 17 00:00:00 2001 From: xarkes Date: Sun, 8 Dec 2019 08:08:44 +0100 Subject: [PATCH] Added a temporary fix to allow backslashes names (#1899) --- src/dialogs/EditVariablesDialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dialogs/EditVariablesDialog.cpp b/src/dialogs/EditVariablesDialog.cpp index 03cc3e65..5daad69a 100644 --- a/src/dialogs/EditVariablesDialog.cpp +++ b/src/dialogs/EditVariablesDialog.cpp @@ -57,7 +57,10 @@ void EditVariablesDialog::applyFields() Core()->cmdRaw(QString("afvt %1 %2").arg(desc.name).arg(ui->typeComboBox->currentText())); - QString newName = ui->nameEdit->text().replace(QLatin1Char(' '), QLatin1Char('_')); + // TODO Remove all those replace once r2 command parser is fixed + QString newName = ui->nameEdit->text().replace(QLatin1Char(' '), QLatin1Char('_')) + .replace(QLatin1Char('\\'), QLatin1Char('_')) + .replace(QLatin1Char('/'), QLatin1Char('_')); if (newName != desc.name) { Core()->cmdRaw(QString("afvn %1 %2").arg(newName).arg(desc.name)); }