fix: sort & 一些错误

This commit is contained in:
msojocs 2023-07-16 19:01:06 +08:00
parent d8a41a03a3
commit 15b78e33bb
3 changed files with 21 additions and 15 deletions

View File

@ -93,7 +93,7 @@ namespace WXML
bool AttrsCompartor(std::pair<std::string,WXML::DOMLib::Token> const& a1,std::pair<std::string,WXML::DOMLib::Token> 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)

View File

@ -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

View File

@ -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<char,std::char_traits<char>,std::allocator<char>>::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!=<char>((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<<char>((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<<<char>(v193, (int *)this);
v195 = std::operator<<<std::char_traits<char>>(v194, "')");
std::operator<<<std::char_traits<char>>(v195, a12);
// v324 std::vector<std::pair<std::string, WXML::DOMLib::Token>>
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<<<std::char_traits<char>>(v212, ",'");
v214 = std::operator<<<char>(v213, (int *)&Str);
std::operator<<<std::char_traits<char>>(v214, "',");
// ii->offset_80 -> ii->offset_24->offset_56
v215 = (std::ostream::sentry *)std::ostream::operator<<(*((_DWORD *)ii + 20));
v216 = std::operator<<<std::char_traits<char>>(v215, ",");
v217 = std::operator<<<char>(v216, a8);