Decompile 2 functions in Source/Archive/MemMapPakFile.cpp, Source/Network/TextEncoding.cpp, ...

Batch #18676 by eAthena: 2 byte-identical, 0 confirmed by peer review.

- fn_18142 CMemMapPakFile::Read: byte-identical
- fn_03951 CCURLMgr::ToUtf8: byte-identical

Merged automatically: every function is byte-identical to the original.
This commit is contained in:
ragnarok-clanker 2026-11-12 17:48:27 +00:00
commit dcc8218012
2 changed files with 7 additions and 8 deletions

View file

@ -129,10 +129,10 @@ std::uint8_t* CMemMapPakFile::Read(std::uint64_t offset, std::uint32_t length) {
SetFilePointerEx(this->m_handle, position, nullptr, FILE_BEGIN);
DWORD read = 0;
if (ReadFile(this->m_handle, this->m_buffer.data(), length, &read, nullptr)) {
this->m_view = this->m_buffer.empty() ? nullptr : this->m_buffer.data();
return this->m_view;
if (!ReadFile(this->m_handle, this->m_buffer.data(), length, &read, nullptr)) {
return nullptr;
}
return nullptr;
this->m_view = this->m_buffer.empty() ? nullptr : this->m_buffer.data();
return this->m_view;
}

View file

@ -30,12 +30,11 @@ std::string CCURLMgr::ToUtf8(std::string text) {
if (converted) {
WideCharToMultiByte(CP_UTF8, 0, wide, -1, converted, length, nullptr, nullptr);
result.assign(converted, std::strlen(converted));
_freea(converted);
} else {
result.assign(converted, std::strlen(converted));
}
result = converted;
_freea(converted);
SysFreeString(wide);
}