I1620: Properly range check character value before using as index (Coverity)
This commit is contained in:
parent
fed2f126b1
commit
d452c27c74
1 changed files with 2 additions and 1 deletions
|
@ -356,7 +356,8 @@ else { /* RA */
|
||||||
PAR = ADDR_A (PAR, -2); /* decr mem addr*/
|
PAR = ADDR_A (PAR, -2); /* decr mem addr*/
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
else if (tti_to_alp[raw] < 0) { /* illegal char? */
|
else if ((raw >= sizeof(tti_to_alp)) || /* illegal char? */
|
||||||
|
(tti_to_alp[raw] < 0)) {
|
||||||
tto_write ('\a'); /* beep! */
|
tto_write ('\a'); /* beep! */
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue