Fix dereference through null pointer problem.
authorGregory Minshall <minshall@ucbvax.Berkeley.EDU>
Mon, 1 Jun 1987 01:53:05 +0000 (17:53 -0800)
committerGregory Minshall <minshall@ucbvax.Berkeley.EDU>
Mon, 1 Jun 1987 01:53:05 +0000 (17:53 -0800)
SCCS-vsn: usr.bin/tn3270/tools/mkastosc/mkastosc.c 1.7

usr/src/usr.bin/tn3270/tools/mkastosc/mkastosc.c

index 00d3f51..8593b82 100644 (file)
@@ -98,7 +98,7 @@ char  *argv[];
     }
     /* Now, output the table */
     for (Pt = tbl, asciicode = 0; Pt <= tbl+highestof(tbl); Pt++, asciicode++) {
     }
     /* Now, output the table */
     for (Pt = tbl, asciicode = 0; Pt <= tbl+highestof(tbl); Pt++, asciicode++) {
-       if (Pt->shift[0] == 0) {
+       if ((Pt->shift == 0) || (Pt->shift[0] == 0)) {
            if (isprint(asciicode) && (asciicode != ' ')) {
                fprintf(stderr, "Unable to produce scancode sequence for");
                fprintf(stderr, " ASCII character [%c]!\n", asciicode);
            if (isprint(asciicode) && (asciicode != ' ')) {
                fprintf(stderr, "Unable to produce scancode sequence for");
                fprintf(stderr, " ASCII character [%c]!\n", asciicode);