diff --git a/gcc/cobol/scan_ante.h b/gcc/cobol/scan_ante.h index bd12f7268d7a465d09618b0e376c740444e78510..605a4ac4308e788fa61be40e07424be829ab3887 100644 --- a/gcc/cobol/scan_ante.h +++ b/gcc/cobol/scan_ante.h @@ -363,7 +363,7 @@ update_location() { size_t len = yyleng; if( n ) { char *p = static_cast<char*>(memrchr(yytext, '\n', yyleng)); - len = (yytext + yyleng) - p; + len = (yytext + yyleng) - ++p; } if( yylloc.last_line != yylineno ) {