diff --git a/src/wxss/css_tree_lib/css_syntax_tree.cpp b/src/wxss/css_tree_lib/css_syntax_tree.cpp index b8a860e..30291da 100644 --- a/src/wxss/css_tree_lib/css_syntax_tree.cpp +++ b/src/wxss/css_tree_lib/css_syntax_tree.cpp @@ -15,8 +15,11 @@ namespace WXSS { } + int RenderCode_i = 0; void CSSSyntaxTree::RenderCode(std::string & a2, bool a3) { + RenderCode_i++; + int inner_RenderCode_i = RenderCode_i; // 10296 if (this->offset_116) { if (!this->offset_172) diff --git a/src/wxss/css_tree_lib/lexical_checker.cpp b/src/wxss/css_tree_lib/lexical_checker.cpp index 2511603..9e999a8 100644 --- a/src/wxss/css_tree_lib/lexical_checker.cpp +++ b/src/wxss/css_tree_lib/lexical_checker.cpp @@ -15,15 +15,15 @@ namespace WXSS { for (auto lt = a2->offset_120.begin(); lt != a2->offset_120.end(); lt++) { - if (lt->get()->offset_0 == "SELECTORS") + if ((*lt)->offset_0 == "SELECTORS") { - auto v2 = lt->get()->offset_120; + auto v2 = (*lt)->offset_120; if (v2.size() == 1) { - auto v3 = v2.front().get(); + auto v3 = v2[0]; if (v3->offset_0 == "F_SELECTOR") { - auto v4 = v2.front()->offset_120; + auto v4 = v2[0]->offset_120; if (v4.size() > 1) { auto v12 = v4[1]; @@ -35,7 +35,7 @@ namespace WXSS a2->offset_172 = 1; if (v4.size() == 5) { - auto lb = v4[3].get(); + auto lb = v4[3]; if (lb->offset_0 == "SELECTOR") { auto v13 = lb->offset_120; @@ -119,6 +119,7 @@ namespace WXSS *v24 = v26.str(); v18->offset_24.offset_4 = v24; + v18->offset_24.offset_0 = 3; v18->offset_164 = v9 + 1; v18->offset_168 = v9 + 2; @@ -426,7 +427,7 @@ namespace WXSS v14.push_back(ch); } } - if (a2->offset_24.offset_16 != lit.length()) + if (a2->offset_24.offset_16 != v14.length()) { std::shared_ptr str(new std::string()); *str = v14; @@ -530,8 +531,11 @@ namespace WXSS * 00519BB4 - WXSS::CSSTreeLib::RuleChain::MarkGood * */ + int off_519BB4_i = 0; int off_519BB4(std::shared_ptr& a1, std::shared_ptr &a2) { + off_519BB4_i++; + int inner_off_519BB4_i = off_519BB4_i; int ret = 0; for (int i = 0; i < a1->offset_4_vecPtr.size(); i++) { diff --git a/src/wxss/token.cpp b/src/wxss/token.cpp index 3009153..a74a1a7 100644 --- a/src/wxss/token.cpp +++ b/src/wxss/token.cpp @@ -5,6 +5,7 @@ namespace WXSS Token::Token(/* args */) { + this->offset_28[0] = '\0'; } Token::~Token() diff --git a/src/wxss/tokenizer.cpp b/src/wxss/tokenizer.cpp index 72fb3de..46f3f7f 100644 --- a/src/wxss/tokenizer.cpp +++ b/src/wxss/tokenizer.cpp @@ -408,7 +408,7 @@ namespace WXSS } sa++; } - int v38 = ((lt & 0x20000) == 0) + v47 - 1; + v38 = ((lt & 0x20000) == 0) + v47 - 1; for (char j = this->offset_0[v43]; sa < v38; j = this->offset_0[v38]) { int v21 = j - 10; @@ -421,8 +421,10 @@ namespace WXSS } v58.offset_12 = sa; int v39 = v38 - sa + 1; + v58.offset_16 = v39; std::string str = this->offset_0.substr(sa, v39); v58.offset_4 = std::make_shared(str); + } if (v58.offset_0 != 1) { diff --git a/src/wxss/x_compiler.cpp b/src/wxss/x_compiler.cpp index 4a5548d..c14775c 100644 --- a/src/wxss/x_compiler.cpp +++ b/src/wxss/x_compiler.cpp @@ -516,6 +516,7 @@ namespace WXSS std::string v33; auto v29 = k->second; this->GenExpr(v29, v37, v33); + // if (v33.length()) { this->DealRPX(v33, v37); diff --git a/test/wcsc.disassembly.cpp b/test/wcsc.disassembly.cpp index 6570bc8..94dde55 100644 --- a/test/wcsc.disassembly.cpp +++ b/test/wcsc.disassembly.cpp @@ -44689,7 +44689,7 @@ char __stdcall WXSS::CSSTreeLib::MarkHostRule::MarkGood( std::__shared_ptr::__shared_ptr(&v18[1], v11); v4 = *(struct _Unwind_Exception **)(*(_DWORD *)&v18[1] + 120); lpuexcpta = v4; - v10 = *(_DWORD *)(*(_DWORD *)&v18[1] + 124) - (_DWORD)v4; + v10 = *(_DWORD *)(*(_DWORD *)&v18[1] + 124) - (_DWORD)v4; // size if ( v10 > 8 ) { v12 = *((_DWORD *)v4 + 2); @@ -46240,7 +46240,7 @@ char __stdcall WXSS::CSSTreeLib::RewriteSelectorRule::MarkGood( std::string::basic_string(&v17, Literal, (int)&v20); while ( (unsigned int)lpuexcpt < v18 ) { - if ( *((_BYTE *)lpuexcpt + (_DWORD)v17) == 46 + if ( *((_BYTE *)lpuexcpt + (_DWORD)v17) == '.'/*46*/ && (unsigned int)lpuexcpt + 1 < v18 && (unsigned int)(*((char *)lpuexcpt + (_DWORD)v17 + 1) - 48) > 9 ) { @@ -46252,6 +46252,7 @@ char __stdcall WXSS::CSSTreeLib::RewriteSelectorRule::MarkGood( } lpuexcpt = (struct _Unwind_Exception *)((char *)lpuexcpt + 1); } + // v15 -> v14.length() if ( *((_DWORD *)this + 10) != v15 ) { Block = (char *)operator new(0x18u);