diff --git a/Source/UI/Edit/UIEditCtrl.cpp b/Source/UI/Edit/UIEditCtrl.cpp index b54e725e7..4eb65e7b2 100644 --- a/Source/UI/Edit/UIEditCtrl.cpp +++ b/Source/UI/Edit/UIEditCtrl.cpp @@ -10198,7 +10198,7 @@ void UIEditCtrl3::DecodeLinkFields(const std::string& link, std::vector& fi return; } - char* text = static_cast(std::malloc(static_cast(length))); + char* text = new char[length]; strcpy_s(text, length, link.c_str()); std::string value; @@ -10267,7 +10267,7 @@ void UIEditCtrl3::DecodeLinkFields(const std::string& link, std::vector& fi } } - std::free(text); + delete[] text; } // OFFSET: 0x00859220