NOVA: Fixed missing break in loader & overlook case in address parse (COVERITY)
This commit is contained in:
parent
97a11f2b05
commit
396dd88def
1 changed files with 26 additions and 22 deletions
|
@ -1,6 +1,6 @@
|
||||||
/* nova_sys.c: NOVA simulator interface
|
/* nova_sys.c: NOVA simulator interface
|
||||||
|
|
||||||
Copyright (c) 1993-2012, Robert M. Supnik
|
Copyright (c) 1993-2017, Robert M. Supnik
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
@ -23,9 +23,11 @@
|
||||||
used in advertising or otherwise to promote the sale, use or other dealings
|
used in advertising or otherwise to promote the sale, use or other dealings
|
||||||
in this Software without prior written authorization from Robert M Supnik.
|
in this Software without prior written authorization from Robert M Supnik.
|
||||||
|
|
||||||
|
09-Mar-17 RMS Fixed missing break in loader (COVERITY)
|
||||||
|
Fixed overlook case in address parse (COVERITY)
|
||||||
25-Mar-12 RMS Fixed declaration (Mark Pizzolato)
|
25-Mar-12 RMS Fixed declaration (Mark Pizzolato)
|
||||||
04-Jul-07 BKR DEC's IOF/ION changed to DG's INTDS/INTEN mnemonic,
|
04-Jul-07 BKR DEC's IOF/ION changed to DG's INTDS/INTEN mnemonic,
|
||||||
Fixed QTY/ADCV device name,
|
Fixed QTY/ADCV device name
|
||||||
RDSW changed to DDG's READS mnemonic,
|
RDSW changed to DDG's READS mnemonic,
|
||||||
fixed/enhanced 'load' command for DG-compatible binary tape format
|
fixed/enhanced 'load' command for DG-compatible binary tape format
|
||||||
26-Mar-04 RMS Fixed warning with -std=c99
|
26-Mar-04 RMS Fixed warning with -std=c99
|
||||||
|
@ -205,7 +207,6 @@ for ( pos = 0 ; (! done) && ((i=getc(fileref)) != EOF) ; ++pos )
|
||||||
origin = i;
|
origin = i;
|
||||||
state = 3;
|
state = 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: /* high origin */
|
case 3: /* high origin */
|
||||||
origin = (i << 8) | origin;
|
origin = (i << 8) | origin;
|
||||||
csum = csum + origin;
|
csum = csum + origin;
|
||||||
|
@ -235,7 +236,9 @@ for ( pos = 0 ; (! done) && ((i=getc(fileref)) != EOF) ; ++pos )
|
||||||
{
|
{
|
||||||
/* 'ignore' block */
|
/* 'ignore' block */
|
||||||
state = 8;
|
state = 8;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 'data' or 'repeat' block */
|
/* 'data' or 'repeat' block */
|
||||||
count = 0200000 - count ;
|
count = 0200000 - count ;
|
||||||
if ( count <= 020 )
|
if ( count <= 020 )
|
||||||
|
@ -267,7 +270,7 @@ for ( pos = 0 ; (! done) && ((i=getc(fileref)) != EOF) ; ++pos )
|
||||||
data = (i << 8) | data;
|
data = (i << 8) | data;
|
||||||
csum = (csum + data) & 0xFFFF;
|
csum = (csum + data) & 0xFFFF;
|
||||||
|
|
||||||
if (origin >= AMASK /* MEMSIZE? */)
|
if (origin >= AMASK)
|
||||||
return SCPE_NXM;
|
return SCPE_NXM;
|
||||||
M[origin] = data;
|
M[origin] = data;
|
||||||
origin = origin + 1;
|
origin = origin + 1;
|
||||||
|
@ -879,6 +882,7 @@ if (*cptr == '@') { /* indirect? */
|
||||||
if (*cptr == '.') { /* relative? */
|
if (*cptr == '.') { /* relative? */
|
||||||
pflag = pflag | A_PER;
|
pflag = pflag | A_PER;
|
||||||
x = 1; /* "index" is PC */
|
x = 1; /* "index" is PC */
|
||||||
|
d = 0; /* default disp is 0 */
|
||||||
cptr++;
|
cptr++;
|
||||||
}
|
}
|
||||||
if (*cptr == '+') { /* + sign? */
|
if (*cptr == '+') { /* + sign? */
|
||||||
|
|
Loading…
Add table
Reference in a new issue