Fix crash on pasting from clipboard

I don't know why it didn't happen for anyone else, but according to https://wiki.libsdl.org/SDL_GetClipboardText : "Use this function to get UTF-8 text from the clipboard, which must be freed with SDL_free().". MSVC detected some heap corruption because of free(text);
dev-time-step
MrSimbax 2016-03-06 23:21:04 +01:00
parent 9effa308ce
commit 9679546988
1 changed files with 1 additions and 1 deletions

View File

@ -2578,7 +2578,7 @@ bool CEdit::Paste()
InsertOne(c);
}
free(text);
SDL_free(text);
Justif();
ColumnFix();
SendModifEvent();