Skip to content

Conversation

@ActingBadly
Copy link

If there is an issue with patching from the diff file, it will output the error to the console. I'm not modifying the diff manually anymore but should still be useful.

If there is an issue with patching from the diff file, it will output the error to the console. I'm not modifying the diff manually anymore but should still be useful.
Comment on lines +409 to +412
std::cerr << "apply_dif: mismatch at offset 0x" << std::hex << offset
<< ": file=0x" << std::setw(2) << std::setfill('0') << file_b
<< " expected=0x" << std::setw(2) << expect_b
<< " replace=0x" << std::setw(2) << repl_b << std::dec << "\n";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is complicated enough that I'd rather not use iostreams. I have a formatting facility in stdext that should be able to handle this better; see stdext/format.h. It'll wind up looking like this (untested):

stdext::format(stdext::strerr(), "apply_dif: mismatch at offset 0x${0:X}: file=0x${1:02X} expected=0x${2:02X} replace=0x${3:02X}\n", offset, file_b, expect_b, repl_b);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants