Skip to content

Commit

Permalink
moved the logging output closer to where read length is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Katana-Steel committed May 23, 2017
1 parent b2fd856 commit 6de1220
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mpq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,11 @@ int CMpq::ExtractTo(unsigned char *mpqbuf, UInt32 entry, FILE *fpMpq)
length_write = 0;
explode(&param);
length_read = length_write;
if (length_read > 0x1000) {
std::cout << "Warning file: " << this->FilenameTable+(entry * PATH_MAX) << '\n';
std::cout << "read size:" << length_read << " bytes at block: ";
std::cout << j << " metod match: '0x08'" << std::endl;
}
iteration--;
if (iteration) {
read_buffer = write_buffer;
Expand Down Expand Up @@ -579,11 +584,6 @@ int CMpq::ExtractTo(unsigned char *mpqbuf, UInt32 entry, FILE *fpMpq)
(UIntPtr) length_read, (UIntPtr) write_buffer,
0x1000);
}
if (length_read > 0x1000) {
std::cout << "Warning file: " << this->FilenameTable+(entry * PATH_MAX) << '\n';
std::cout << "read size:" << length_read << " bytes at block: ";
std::cout << j << " metod found: '" << std::hex << (uint8_t)metod << "'" << std::endl;
}
memcpy(mpqptr, write_buffer, length_read);
mpqptr += length_read;
// fwrite(write_buffer, 1, length_read, fp_new);
Expand Down

0 comments on commit 6de1220

Please sign in to comment.