ALTAIR: Leave room for NUL byte in the degenerate case (COVERITY)

This commit is contained in:
Mark Pizzolato 2017-03-30 12:54:23 -07:00
parent 773cc1c319
commit 8344225aef

View file

@ -252,7 +252,7 @@ if ((sw & SWMASK ('C')) || ((*cptr == '"') && cptr++)) { /* ASCII string? */
or numeric (including spaces).
*/
while (i < sizeof (gbuf) - 3) {
while (i < sizeof (gbuf) - 4) {
if (*cptr == ',' || *cptr == '\0' ||
sim_isdigit(*cptr))
break;