fix a decompress buffer length error
This commit is contained in:
parent
4173de5d2c
commit
58aee73fd6
|
@ -239,7 +239,7 @@ namespace LibCmo {
|
||||||
parser->MoveCursor(this->m_FileInfo.DataPackSize);
|
parser->MoveCursor(this->m_FileInfo.DataPackSize);
|
||||||
|
|
||||||
if (decomp_buffer != nullptr) {
|
if (decomp_buffer != nullptr) {
|
||||||
parser = new(std::nothrow) CKBufferParser(decomp_buffer, this->m_FileInfo.Hdr1UnPackSize, true);
|
parser = new(std::nothrow) CKBufferParser(decomp_buffer, this->m_FileInfo.DataUnPackSize, true);
|
||||||
if (parser == nullptr) {
|
if (parser == nullptr) {
|
||||||
delete[] decomp_buffer;
|
delete[] decomp_buffer;
|
||||||
return CKERROR::CKERR_OUTOFMEMORY;
|
return CKERROR::CKERR_OUTOFMEMORY;
|
||||||
|
|
|
@ -11,7 +11,7 @@ int main(int argc, char* argv[]) {
|
||||||
|
|
||||||
LibCmo::Utils::VirtoolsEnvironment vtctx;
|
LibCmo::Utils::VirtoolsEnvironment vtctx;
|
||||||
LibCmo::CKFile vtfile(vtctx);
|
LibCmo::CKFile vtfile(vtctx);
|
||||||
LibCmo::CKERROR err = vtfile.Load("Language.old.nmo", LibCmo::CK_LOAD_FLAGS::CK_LOAD_DEFAULT);
|
LibCmo::CKERROR err = vtfile.Load("VeryOldFile.nmo", LibCmo::CK_LOAD_FLAGS::CK_LOAD_DEFAULT);
|
||||||
|
|
||||||
Unvirt::StructFormatter::PrintCKFileInfo(vtfile.m_FileInfo);
|
Unvirt::StructFormatter::PrintCKFileInfo(vtfile.m_FileInfo);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user