diff --git a/src/wxml/dom_lib/common.cpp b/src/wxml/dom_lib/common.cpp index 4a342f7..572dcb1 100644 --- a/src/wxml/dom_lib/common.cpp +++ b/src/wxml/dom_lib/common.cpp @@ -93,7 +93,7 @@ namespace WXML bool AttrsCompartor(std::pair const& a1,std::pair const& a2) { - return a1.second.offset_40 < a2.second.offset_40; + return a1.second.offset_56 < a2.second.offset_56; } std::string removern(std::string const& a2) diff --git a/src/wxml/dom_lib/wxml_dom.cpp b/src/wxml/dom_lib/wxml_dom.cpp index 3afd9c8..8f4504f 100644 --- a/src/wxml/dom_lib/wxml_dom.cpp +++ b/src/wxml/dom_lib/wxml_dom.cpp @@ -1319,7 +1319,7 @@ namespace WXML { v339.append("};"); v327 = v339; } - if (v324.end() - v324.begin() <= 1) + if (v324.size() <= 1) { a6 << "var " << a5 << "=_n('"; a6 << this->offset_0 << "')" << a12; @@ -1343,14 +1343,14 @@ namespace WXML { { str = WXML::DOMLib::WXMLDom::ToCamelStyle(i->first); } - if(1) + if(i->second.offset_20) { - // if () - // { - - // } + if (i->second.offset_56 == -1) + { + throw this->Error(a2, i->second, i->first, "interal error(1010)"); + } a6 << "_rz(z," << a5 << ",'" << str << "',"; - // a6 << ; + a6 << i->second.offset_56; a6 << "," << a8 << "," << a9 << "," << a10 << ")"; } else diff --git a/test/wcc.disassembly.cpp b/test/wcc.disassembly.cpp index 472db3e..c8042cf 100644 --- a/test/wcc.disassembly.cpp +++ b/test/wcc.disassembly.cpp @@ -21741,9 +21741,7 @@ int __cdecl night::writefile(char *FileName, int a2) //----- (0041EB4C) -------------------------------------------------------- bool __cdecl WXML::DOMLib::AttrsCompartor(int a1, int a2) { - // v298 + 4 -> v298.offset_16; j->first - // v298 + 10 -> v298.offset_40; j->second - // v298 + 25 -> v298.offset_100; j->second.offset_60 + // a1 + 80 -> a1->offset_24->offset_56 return *(_DWORD *)(a1 + 80) < *(_DWORD *)(a2 + 80); } @@ -25454,7 +25452,7 @@ LABEL_9: std::basic_stringstream,std::allocator>::basic_stringstream((int)v347); for ( m = 0; (unsigned int)m < -252645135 * ((int)&v325[-v324] >> 3); m = (std::ostream::sentry *)((char *)m + 1) ) { - v258 = (std::ostream::sentry *)(136 * (_DWORD)m); + v258 = (std::ostream::sentry *)(136 * (_DWORD)m); // cur pos Str1b = (char *)(136 * (_DWORD)m + v324); std::string::substr(&v333, Str1b, 0, 6u); v300 = std::operator!=((int)&v333, "model:"); @@ -25476,6 +25474,7 @@ LABEL_9: v284 = (std::ostream::sentry *)v332[0]; v303 = &v331; + // find while ( v284 ) { // (int)v284 + 16 -> (int)v284 offset_16 @@ -25493,7 +25492,6 @@ LABEL_9: v284 = v169; v303 = v168; } // end while - if ( v303 != &v331 ) { v167 = (unsigned __int8)std::operator<((int)&v336, (int)(v303 + 4)) == 0; @@ -25502,17 +25500,21 @@ LABEL_9: v170 = v303; v303 = v170; } + // find end + std::string::_M_dispose((void **)&v336); if ( v303 == &v331 ) { std::string::substr(&v339, Str1b, 6u, 0xFFFFFFFF); + // v258 + v324 -> cur data std::string::operator=((unsigned __int8 **)((char *)v258 + v324), (int)&v339); std::string::_M_dispose((void **)&v339); } else { - v171 = (unsigned __int8 **)((char *)v258 + v324); - v172 = (char *)v258 + v324 + 136; + v171 = (unsigned __int8 **)((char *)v258 + v324); // cur + v172 = (char *)v258 + v324 + 136; // next + // v325 end if ( v325 != v172 ) { for ( n = -252645135 * ((v325 - v172) >> 3); ; --n ) @@ -25559,6 +25561,7 @@ LABEL_9: v194 = std::operator<<(v193, (int *)this); v195 = std::operator<<>(v194, "')"); std::operator<<>(v195, a12); + // v324 std::vector> for ( ii = (std::ostream::sentry *)v324; ; ii = (std::ostream::sentry *)((char *)ii + 136) ) { if ( ii == (std::ostream::sentry *)v325 ) @@ -25607,8 +25610,10 @@ LABEL_9: std::string::operator=((unsigned __int8 **)&Str, (int)v347); std::string::_M_dispose((void **)v347); } + // ii->offset_44 -> ii->offset_24->offset_20 if ( *((_DWORD *)ii + 11) ) { + // ii->offset_80 -> ii->offset_24->offset_56 if ( *((_DWORD *)ii + 20) == -1 ) { v255 = __cxa_allocate_exception(0x18u); @@ -25625,6 +25630,7 @@ LABEL_9: v213 = std::operator<<>(v212, ",'"); v214 = std::operator<<(v213, (int *)&Str); std::operator<<>(v214, "',"); + // ii->offset_80 -> ii->offset_24->offset_56 v215 = (std::ostream::sentry *)std::ostream::operator<<(*((_DWORD *)ii + 20)); v216 = std::operator<<>(v215, ","); v217 = std::operator<<(v216, a8);