Fixed array bound error. Amazing that it worked on a SUN-3
authorceriel <none@none>
Tue, 17 Sep 1991 10:39:20 +0000 (10:39 +0000)
committerceriel <none@none>
Tue, 17 Sep 1991 10:39:20 +0000 (10:39 +0000)
util/ncgg/output.c

index d51de88..d98a710 100644 (file)
@@ -402,7 +402,8 @@ outtokens() {
                for(i=0;i<maxtokensize;i++)
                        fprintf(ctable,"%d,",typeconv(tp->tk_att[i].ta_type));
                fprintf(ctable,"},%d},\t/* ",tp->tk_format);
-               outfmt(l_strings[tp->tk_format]);
+               if (tp->tk_format >= 0) outfmt(l_strings[tp->tk_format]);
+               else fprintf(ctable, "(no format)");
                fprintf(ctable," */\n");
        }
        fprintf(ctable,"{0}};\n\n");