caused an error message. In this case, the line info was not available
leading to a PRECONDITION VIOLATED.
git-svn-id: svn://svn.cc65.org/cc65/trunk@2370
b7a2c559-68d2-44c3-8de9-
860c34a00d81
}
CurTok = NextTok;
+ /* When reading the first time from the file, the line info in NextTok,
+ * which was copied to CurTok is invalid. Since the information from
+ * the token is used for error messages, we must make it valid.
+ */
+ if (CurTok.LI == 0) {
+ CurTok.LI = UseLineInfo (GetCurLineInfo ());
+ }
+
/* Remember the starting position of the next token */
NextTok.LI = UseLineInfo (GetCurLineInfo ());