1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-01-13 15:27:04 +00:00

ICL1900: Cleanup Coverity errors.

This commit is contained in:
Richard Cornwell 2019-02-16 22:37:45 -05:00
parent 025dcfd88e
commit 4f69eea8ea
2 changed files with 3 additions and 2 deletions

View File

@ -2538,7 +2538,7 @@ cpu_set_size(UNIT * uptr, int32 val, CONST char *cptr, void *desc)
val = (val + 1) * 4096;
if ((val < 0) || (val > MAXMEMSIZE))
return SCPE_ARG;
for (i = val; i < MEMSIZE; i++)
for (i = val - 1; i < MEMSIZE; i++)
mc |= M[i];
if ((mc != 0) && (!get_yn("Really truncate memory [N]?", FALSE)))
return SCPE_OK;

View File

@ -247,7 +247,8 @@ sim_load(FILE * fileref, CONST char *cptr, CONST char *fnam, int flag)
if (*p < '0' || *p > '7') {
break;
}
addr = (addr << 3) | (*p++ - '0');
ch = ascii_to_mem[*p++ & 0177];
addr = (addr << 3) | ch;
}
while (*p != '*') {
if (*p == '\0' || *p == '\n') {