diff options
| author | Quentin Carbonneaux | 2015-03-05 15:14:08 -0500 |
|---|---|---|
| committer | Quentin Carbonneaux | 2015-03-05 15:14:08 -0500 |
| commit | 76cd27322920f413a309c443ec101fc21373677a (patch) | |
| tree | 21cc98c444f656b691a458c2a86467bce6887266 | |
| parent | f876ccd814140523cc300070dc2e15b4f7c032e6 (diff) | |
output empty tables correctly
| -rw-r--r-- | miniyacc.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -640,11 +640,10 @@ aout(char *name, int *t, int n) if (i % 10 == 0) fprintf(fout, "\n"); fprintf(fout, "%4d", t[i]); - if (i == n-1) - fprintf(fout, "\n};\n"); - else + if (i != n-1) fprintf(fout, ","); } + fprintf(fout, "\n};\n"); } void |
