diff --git a/src/include/souffle/profile/EventProcessor.h b/src/include/souffle/profile/EventProcessor.h index ba33082fe55..4a26980c590 100644 --- a/src/include/souffle/profile/EventProcessor.h +++ b/src/include/souffle/profile/EventProcessor.h @@ -103,11 +103,10 @@ class EventProcessorSingleton { break; } ++start_pos; - if (str[start_pos] == 't' || str[start_pos] == '"' || str[start_pos] == '\\' || - str[start_pos] == 'n' || str[start_pos] == ';') { - continue; + if (str[start_pos] != 't' && str[start_pos] != '"' && str[start_pos] != '\\' && + str[start_pos] != 'n' && str[start_pos] != ';') { + str.replace(start_pos - 1, 1, "\\\\"); } - str.replace(start_pos - 1, 1, "\\\\"); ++start_pos; } return str;