I don't think I changed anything...
This commit is contained in:
parent
ba24020857
commit
586d09e533
|
@ -260,18 +260,15 @@ CAmxxReader::Error CAmxxReader::GetSection(void *buffer)
|
||||||
TableEntry entry;
|
TableEntry entry;
|
||||||
DATAREAD(&entry, sizeof(entry), 1);
|
DATAREAD(&entry, sizeof(entry), 1);
|
||||||
fseek(m_pFile, entry.offset, SEEK_SET);
|
fseek(m_pFile, entry.offset, SEEK_SET);
|
||||||
// AMXXLOG_Log("|||| Offset needed: %d At: %d", entry.offset, ftell(m_pFile));
|
|
||||||
uLongf destLen = GetBufferSize();
|
uLongf destLen = GetBufferSize();
|
||||||
// read the data to a temporary buffer
|
// read the data to a temporary buffer
|
||||||
char *tempBuffer = new char[m_SectionLength + 1];
|
char *tempBuffer = new char[m_SectionLength + 1];
|
||||||
//fread(tempBuffer, sizeof(char), m_SectionLength, m_pFile);
|
//fread(tempBuffer, sizeof(char), m_SectionLength, m_pFile);
|
||||||
DATAREAD((void*)tempBuffer, 1, m_SectionLength);
|
DATAREAD((void*)tempBuffer, 1, m_SectionLength);
|
||||||
// decompress
|
// decompress
|
||||||
// AMXXLOG_Log("|||| First Bytes: %d %d %d %d", tempBuffer[0], tempBuffer[1], tempBuffer[2], tempBuffer[3]);
|
|
||||||
int result = uncompress((Bytef *)buffer, &destLen,
|
int result = uncompress((Bytef *)buffer, &destLen,
|
||||||
(Bytef *)tempBuffer, m_SectionLength);
|
(Bytef *)tempBuffer, m_SectionLength);
|
||||||
delete [] tempBuffer;
|
delete [] tempBuffer;
|
||||||
// AMXXLOG_Log("|||| Result: %d, m_SectionLength=%d, destLen=%d", result, m_SectionLength, destLen);
|
|
||||||
if (result != Z_OK)
|
if (result != Z_OK)
|
||||||
{
|
{
|
||||||
m_Status = Err_Decompress;
|
m_Status = Err_Decompress;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user