From a0fedb297b9938ea602695ec252c795e47cb0bd5 Mon Sep 17 00:00:00 2001 From: "matanki.saito" Date: Sun, 25 Aug 2024 01:08:17 +0900 Subject: [PATCH] #259 --- Plugin64/escape_tool.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Plugin64/escape_tool.cpp b/Plugin64/escape_tool.cpp index bd1d69e..c103afb 100644 --- a/Plugin64/escape_tool.cpp +++ b/Plugin64/escape_tool.cpp @@ -439,17 +439,8 @@ ParadoxTextObject* utf8ToEscapedStr2(ParadoxTextObject* from) { return tmpZV2; } -ParadoxTextObject* tmpParadoxTextObject2 = NULL; char* escapedStrToUtf8(ParadoxTextObject* from) { - if (tmpParadoxTextObject2 != NULL) { - if (tmpParadoxTextObject2->len > 0x10) { - free(tmpParadoxTextObject2->t.p); - } - delete tmpParadoxTextObject2; - } - tmpParadoxTextObject2 = new ParadoxTextObject(); - std::wstring* buffer = new std::wstring(); std::string* dest = new std::string(); std::string src = from->getString(); @@ -460,12 +451,12 @@ char* escapedStrToUtf8(ParadoxTextObject* from) { // wide char (ucs2) -> UTF-8 convertWideTextToUtf8(buffer, dest); - tmpParadoxTextObject2->setString(dest); + from->setString(dest); delete buffer; delete dest; - return (char*)tmpParadoxTextObject2; + return (char*)from; } char* utf8ToEscapedStr3buffer = NULL;