projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ce2a8e
)
fix wrong line numbers in error messages
author
Matthias Braun
<matze@braunis.de>
Tue, 9 Mar 2010 22:27:41 +0000
(22:27 +0000)
committer
Matthias Braun
<matze@braunis.de>
Tue, 9 Mar 2010 22:27:41 +0000
(22:27 +0000)
[r27284]
lexer.c
patch
|
blob
|
history
diff --git
a/lexer.c
b/lexer.c
index
4ff847d
..
99dd4e6
100644
(file)
--- a/
lexer.c
+++ b/
lexer.c
@@
-1242,7
+1242,8
@@
static void parse_line_directive(void)
if (pp_token.type != T_INTEGER) {
parse_error("expected integer");
} else {
- lexer_token.source_position.linenr = atoi(pp_token.literal.begin);
+ /* use offset -1 as this is about the next line */
+ lexer_token.source_position.linenr = atoi(pp_token.literal.begin) - 1;
next_pp_token();
}
if (pp_token.type == T_STRING_LITERAL) {