I7094: Fix typo in accessing unit array (COVERITY)

This commit is contained in:
Bob Supnik 2017-04-07 11:06:28 -07:00 committed by Mark Pizzolato
parent 60bf7d5d12
commit cc2c8f10fc

View file

@ -1,6 +1,6 @@
/* i7094_com.c: IBM 7094 7750 communications interface simulator /* i7094_com.c: IBM 7094 7750 communications interface simulator
Copyright (c) 2005-2010, Robert M Supnik Copyright (c) 2005-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"),
@ -26,6 +26,7 @@
com 7750 controller com 7750 controller
coml 7750 lines coml 7750 lines
07-Apr-17 RMS Fixed typo in accessing unit array (COVERITY)
12-Aug-10 RMS Major rewrite for CTSS (Dave Pitts) 12-Aug-10 RMS Major rewrite for CTSS (Dave Pitts)
19-Nov-08 RMS Revised for common TMXR show routines 19-Nov-08 RMS Revised for common TMXR show routines
@ -504,7 +505,7 @@ switch (com_sta) { /* case on state */
ent = com_gethd_free (&com_inpq[ln]); /* get first char */ ent = com_gethd_free (&com_inpq[ln]); /* get first char */
if (ent != 0) /* any input? */ if (ent != 0) /* any input? */
chr = com_pkt[ent].data; /* return char */ chr = com_pkt[ent].data; /* return char */
else coml_unit[i].INPP = 0; /* this line is idle */ else coml_unit[ln].INPP = 0; /* this line is idle */
} /* end if input pending */ } /* end if input pending */
if (chr != 0) { /* got something? */ if (chr != 0) { /* got something? */
if ((i++ % 3) == 0) /* next word? */ if ((i++ % 3) == 0) /* next word? */