flood_compile: escape chars in debugging

This commit is contained in:
Justin Viiret 2016-07-21 13:25:26 +10:00 committed by Matthew Barr
parent de543bec24
commit 04634f2e87

View File

@ -69,7 +69,7 @@ static
void updateFloodSuffix(vector<FDRFlood> &tmpFlood, u8 c, u32 suffix) {
FDRFlood &fl = tmpFlood[c];
fl.suffix = MAX(fl.suffix, suffix + 1);
DEBUG_PRINTF("Updated Flood Suffix for char '%c' to %u\n", c, fl.suffix);
DEBUG_PRINTF("Updated Flood Suffix for char 0x%02x to %u\n", c, fl.suffix);
}
static
@ -125,7 +125,8 @@ setupFDRFloodControl(const vector<hwlmLiteral> &lits,
for (u32 i = 0; i < iEnd; i++) {
if (i < litSize) {
if (isDifferent(c, lit.s[litSize - i - 1], lit.nocase)) {
DEBUG_PRINTF("non-flood char in literal[%u] %c != %c\n",
DEBUG_PRINTF("non-flood char in literal[%u]: "
"0x%02x != 0x%02x\n",
i, c, lit.s[litSize - i - 1]);
upSuffix = MIN(upSuffix, i);
loSuffix = MIN(loSuffix, i); // makes sense only for case-less