diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index 55d2137ad..b7256e122 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -1100,7 +1100,7 @@ int ampctl_parse(AMP *my_amp, FILE *fin, FILE *fout, char *argv[], int argc) rp_getline(pmptstr); - if (!(strcmp(input_line, ""))) + if (!input_line || !(strcmp(input_line, ""))) { fprintf(fout, "? for help, q to quit.\n"); fflush(fout); diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 97e9ccd6b..c87ce2ae5 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -1478,7 +1478,7 @@ readline_repeat: rp_getline(pmptstr); - if (!(strcmp(input_line, ""))) + if (!input_line || !(strcmp(input_line, ""))) { fprintf(fout, "? for help, q to quit.\n"); fflush(fout); diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index 1de1bda95..263460a94 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1160,7 +1160,7 @@ int rotctl_parse(ROT *my_rot, FILE *fin, FILE *fout, char *argv[], int argc, rp_getline(pmptstr); - if (!(strcmp(input_line, ""))) + if (!input_line || !(strcmp(input_line, ""))) { fprintf(fout, "? for help, q to quit.\n"); fflush(fout);