From 9679546988ebe727800e5d82bf687438eee7611b Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sun, 6 Mar 2016 23:21:04 +0100 Subject: [PATCH] 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); --- src/ui/controls/edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/controls/edit.cpp b/src/ui/controls/edit.cpp index 481e7c20..78efdcd9 100644 --- a/src/ui/controls/edit.cpp +++ b/src/ui/controls/edit.cpp @@ -2578,7 +2578,7 @@ bool CEdit::Paste() InsertOne(c); } - free(text); + SDL_free(text); Justif(); ColumnFix(); SendModifEvent();