This commit is contained in:
test123456654321 2024-10-27 19:47:45 +08:00
parent 2e935e2956
commit 523ae34cc6
2 changed files with 32 additions and 2 deletions

View File

@ -1404,6 +1404,33 @@ namespace
last = s; last = s;
return write_string_overwrite(data, len, s); return write_string_overwrite(data, len, s);
} }
void TF0100AA1013B96000(hook_stack *stack, HookParam *hp, uintptr_t *data, uintptr_t *split, size_t *len)
{
auto ptr = (char *)*data;
std::string collect;
while (*ptr || *(ptr - 1))
ptr--;
while (!(*ptr && *(ptr + 1)))
ptr++;
do
{
if (!(*ptr))
{
ptr++;
}
else
{
collect += std::string(ptr);
ptr += strlen(ptr);
}
} while (*ptr || *(ptr + 1));
strReplace(collect, "\x87\x85", "\x81\x5c");
strReplace(collect, "\x87\x86", "\x81\x5c");
strReplace(collect, "\x87\x87", "\x81\x5c");
strReplace(collect, "\n", "");
strReplace(collect, "\x81\x40", "");
return write_string_new(data, len, collect);
}
template <int idx> template <int idx>
void T0100CF400F7CE000(hook_stack *stack, HookParam *hp, uintptr_t *data, uintptr_t *split, size_t *len) void T0100CF400F7CE000(hook_stack *stack, HookParam *hp, uintptr_t *data, uintptr_t *split, size_t *len)
{ {
@ -3110,6 +3137,9 @@ namespace
{0x801f67c0, {CODEC_UTF32, 1, 0, 0, F01007FD00DB20000, "01007FD00DB20000", "1.0.0"}}, {0x801f67c0, {CODEC_UTF32, 1, 0, 0, F01007FD00DB20000, "01007FD00DB20000", "1.0.0"}},
{0x802a76c0, {CODEC_UTF32, 0, 0, 0, F01007FD00DB20000, "01007FD00DB20000", "1.0.0"}}, {0x802a76c0, {CODEC_UTF32, 0, 0, 0, F01007FD00DB20000, "01007FD00DB20000", "1.0.0"}},
{0x8031fc80, {CODEC_UTF32, 1, 0, 0, F01007FD00DB20000, "01007FD00DB20000", "1.0.0"}}, {0x8031fc80, {CODEC_UTF32, 1, 0, 0, F01007FD00DB20000, "01007FD00DB20000", "1.0.0"}},
// 真流行り神3
{0x80082F70, {0, 0xb, 0, TF0100AA1013B96000, 0, "0100AA1013B96000", nullptr}},//"1.0.0", "1.0.1"
}; };
return 1; return 1;
}(); }();

View File

@ -51,7 +51,7 @@ inline std::vector<StringT> strSplit_impl(const StringT &s, const StringT &delim
template <class StringT> template <class StringT>
inline bool endWith_impl(const StringT &s, const StringT &s2) inline bool endWith_impl(const StringT &s, const StringT &s2)
{ {
if ((s.size() > s2.size()) && (s.substr(s.size() - s2.size(), s2.size()) == s2)) if ((s.size() >= s2.size()) && (s.substr(s.size() - s2.size(), s2.size()) == s2))
{ {
return true; return true;
} }
@ -61,7 +61,7 @@ inline bool endWith_impl(const StringT &s, const StringT &s2)
template <class StringT> template <class StringT>
inline bool startWith_impl(const StringT &s, const StringT &s2) inline bool startWith_impl(const StringT &s, const StringT &s2)
{ {
if ((s.size() > s2.size()) && (s.substr(0, s2.size()) == s2)) if ((s.size() >= s2.size()) && (s.substr(0, s2.size()) == s2))
{ {
return true; return true;
} }