script_validator segfault fix

Fix script to verify that both init_script and compare_script parameters are defined

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
Vitalii Koshura 2018-07-20 16:12:28 +03:00
parent aae36b1d69
commit e442d8add4
No known key found for this signature in database
GPG Key ID: CE0DB1726070A5A3
1 changed files with 2 additions and 2 deletions

View File

@ -76,9 +76,9 @@ int validate_handler_init(int argc, char** argv) {
}
}
if (!init_script.size() && !compare_script.size()) {
if (!init_script.size() || !compare_script.size()) {
log_messages.printf(MSG_CRITICAL,
"script names missing from command line\n"
"init_script and/or compare_script names are missing from command line\n"
);
return 1;
}