Commit 57e8f8cf authored by David Anderson's avatar David Anderson
Browse files

sample_substr_validator: bug fix for --reject_if_present

parent 5c5f9968
......@@ -31,19 +31,22 @@ char* stderr_string;
bool reject_if_present = false;
void parse_cmdline() {
bool found = false;
for (int i=1; i<g_argc; i++) {
if (!strcmp(g_argv[i], "--stderr_string")) {
stderr_string = g_argv[++i];
return;
found = true;
}
if (!strcmp(g_argv[i], "--reject_if_present")) {
reject_if_present = true;
}
}
log_messages.printf(MSG_CRITICAL,
"--stderr_string missing from command line\n"
);
exit(1);
if (!found) {
log_messages.printf(MSG_CRITICAL,
"--stderr_string missing from command line\n"
);
exit(1);
}
}
int init_result(RESULT& r, void*&) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment