From 55d47817a97f135a92e864f5eeeda7ea4003326d Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Sun, 11 Apr 2021 20:02:25 -0400 Subject: [PATCH] SCP: Updated to current. --- scp.c | 4 ++-- sim_fio.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scp.c b/scp.c index 62428a2..ff6c0e4 100644 --- a/scp.c +++ b/scp.c @@ -15730,7 +15730,7 @@ while (t->function_name) { if (*remainder != '\0') return sim_messagef (SCPE_IERR, "function: %s (\"\", gbuf, 0); returned a non empty string: \"%s\"\n", t->function_name, remainder); - while (*input) { + while ((input != NULL) && (*input != '\0')) { char end_char_string[32]; if (sim_isprint (d->end_char)) @@ -15759,7 +15759,7 @@ while (t->function_name) { } input = remainder; ++d; - if (((input == NULL) || (*input != '\0')) && (d->expected_result == NULL)) + if ((*input != '\0') && (d->expected_result == NULL)) return sim_messagef (SCPE_IERR, "Invalid test configuration detected\n"); } ++t; diff --git a/sim_fio.c b/sim_fio.c index f162bff..e912e2d 100644 --- a/sim_fio.c +++ b/sim_fio.c @@ -332,6 +332,7 @@ if (((*file == '"') && (file[strlen (file) - 1] == '"')) || if (without_quotes == NULL) return NULL; if (SCPE_OK != sim_decode_quoted_string (file, without_quotes, &dsize)) { + free (without_quotes); errno = EINVAL; return NULL; }