Added a temporary fix to allow backslashes names (#1899)

This commit is contained in:
xarkes 2019-12-08 08:08:44 +01:00 committed by GitHub
parent 6c7392c5ce
commit 9929694314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,10 @@ void EditVariablesDialog::applyFields()
Core()->cmdRaw(QString("afvt %1 %2").arg(desc.name).arg(ui->typeComboBox->currentText())); 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) { if (newName != desc.name) {
Core()->cmdRaw(QString("afvn %1 %2").arg(newName).arg(desc.name)); Core()->cmdRaw(QString("afvn %1 %2").arg(newName).arg(desc.name));
} }