Validate prompt chars - thx nyck33 :)

Fix #8506
This commit is contained in:
Nikolaj Olsson 2024-06-09 08:04:15 +02:00
parent 6fa8220e0e
commit ecafda8394

View File

@ -89,6 +89,18 @@ namespace Nikse.SubtitleEdit.Forms.Translate
private void buttonOk_Click(object sender, EventArgs e)
{
if (nikseTextBoxPrompt.Text.Contains('{'))
{
MessageBox.Show("Character not allowed: {");
return;
}
if (nikseTextBoxPrompt.Text.Contains('}'))
{
MessageBox.Show("Character not allowed: }");
return;
}
Configuration.Settings.Tools.AutoTranslateDelaySeconds = (int)nikseUpDownDelay.Value;
Configuration.Settings.Tools.AutoTranslateMaxBytes = (int)nikseUpDownMaxBytes.Value;