From cbd33f53756ebc22db765c38f52361b3c1342bbe Mon Sep 17 00:00:00 2001 From: msojocs Date: Fri, 28 Jul 2023 22:56:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=80=E5=A4=84=E9=81=97=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/night/ns_ast_parse.cpp | 3 ++- src/night/ns_god/ns_god.cpp | 2 +- src/night/ns_token.cpp | 1 + test/wcc.disassembly.cpp | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/night/ns_ast_parse.cpp b/src/night/ns_ast_parse.cpp index a6721b9..525a617 100644 --- a/src/night/ns_ast_parse.cpp +++ b/src/night/ns_ast_parse.cpp @@ -792,7 +792,8 @@ namespace night { auto v1 = this->ast_dispatch(false); auto binary_or_just_value = this->make_binary_or_just_value(v1, false); - return this->make_call_or_just_expression(binary_or_just_value); + auto result = this->make_call_or_just_expression(binary_or_just_value); + return result; } night::ns_node *NSASTParse::ast_expression_no_binary() { diff --git a/src/night/ns_god/ns_god.cpp b/src/night/ns_god/ns_god.cpp index 9aa5a0d..f656861 100644 --- a/src/night/ns_god/ns_god.cpp +++ b/src/night/ns_god/ns_god.cpp @@ -22,7 +22,7 @@ namespace night } if (night::std_v_v_n == a2) { - node->offset_24.vec = new std::vector(); + node->offset_24.vecVec = new std::vector*>(); } this->offset_0.push_back(node); // return node->offset_24_vec; // 审查内存,是一层vector diff --git a/src/night/ns_token.cpp b/src/night/ns_token.cpp index 4808bce..595107b 100644 --- a/src/night/ns_token.cpp +++ b/src/night/ns_token.cpp @@ -73,6 +73,7 @@ namespace night auto v19 = this->offset_4->next(); std::string v15(1, v19.data); v7->offset_60 = v15; + v7->offset_84 = v14; } // goto LABEL_19; } diff --git a/test/wcc.disassembly.cpp b/test/wcc.disassembly.cpp index 6a66bf1..e9397d6 100644 --- a/test/wcc.disassembly.cpp +++ b/test/wcc.disassembly.cpp @@ -16289,8 +16289,10 @@ unsigned __int8 **__fastcall night::NSToken::read_next(int a1) night::NSStream::next(v19, *(night::NSStream **)(a1 + 4)); v15[0] = (int)v16; std::string::_M_construct(v15, 1u, (char)v19[0]); + // v7->offset_60 std::string::operator=(v7 + 15, (int)v15); std::string::_M_dispose((void **)v15); + // v7->offset_84 std::string::_M_assign((int)(v7 + 21), (int)v14); } goto LABEL_19;