mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix slash removal when multiple slashes are pasted in editor
When pasting text containing multiple consecutive (back)slashes in the editor save dialog not all slashes where removed. For example with the text `/a//bb/\/ccc////dddd//\//`.
This commit is contained in:
parent
254f4fa882
commit
1e74e06908
|
@ -4317,8 +4317,13 @@ void CEditor::RenderFileDialog()
|
|||
{
|
||||
// remove '/' and '\'
|
||||
for(int i = 0; m_aFileDialogFileName[i]; ++i)
|
||||
{
|
||||
if(m_aFileDialogFileName[i] == '/' || m_aFileDialogFileName[i] == '\\')
|
||||
{
|
||||
str_copy(&m_aFileDialogFileName[i], &m_aFileDialogFileName[i + 1], (int)(sizeof(m_aFileDialogFileName)) - i);
|
||||
--i;
|
||||
}
|
||||
}
|
||||
m_FilesSelectedIndex = -1;
|
||||
m_aFilesSelectedName[0] = '\0';
|
||||
// find first valid entry, if it exists
|
||||
|
|
Loading…
Reference in a new issue