]> git.saurik.com Git - bison.git/blobdiff - src/output.c
* src/output.c (actions_output): Fix. When we use %no-lines,
[bison.git] / src / output.c
index 4de58e9e1870d8bc84f64a0cd05f8d594cbe6316..841ebe4f3780ec728f52920f437e27ad88a93f45 100644 (file)
@@ -556,8 +556,11 @@ actions_output (FILE *out, size_t *line)
                 rule_table[rule].action,
                 yacc_flag ? ";" : "");
 
-       /* We always output 5 '\n' per action.  */
-       *line += 5;
+       /* We always output 4 '\n' per action.  */
+       *line += 4;
+       /* Plus one if !no_lines_flag.  */
+       if (!no_lines_flag)
+         ++*line;
        /* Get the number of lines written by the user.  */
        *line += get_lines_number (rule_table[rule].action);
       }