Increment line number also for generating gedcom level error.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Wed, 30 Oct 2002 18:47:57 +0000 (18:47 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Wed, 30 Oct 2002 18:47:57 +0000 (18:47 +0000)
gedcom/gedcom_lex_common.c

index 753df118e615e123a26d319c7b9b813010ecae0c..d8f35d768481e219e273c54e8278ec4d13ee6a0a 100644 (file)
@@ -236,6 +236,7 @@ static int dummy_conv = 0;
      CHECK_LINE_LEN;                                                          \
      if ((level < 0) || (level > MAXGEDCLEVEL)) {                             \
        error_level_out_of_range();                                            \
+       line_no++;                                                             \
        return BADTOKEN;                                                       \
      }                                                                        \
      level_diff = level - current_level;                                      \
@@ -253,6 +254,7 @@ static int dummy_conv = 0;
      else {                                                                   \
        /* should never happen (error to GEDCOM spec) */                       \
        error_level_too_high(level_diff);                                      \
+       line_no++;                                                             \
        return BADTOKEN;                                                       \
      }                                                                        \
    }