We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3aa2ea2 commit 65672c1Copy full SHA for 65672c1
go/lex.cc
@@ -1689,6 +1689,16 @@ Lex::skip_cpp_comment()
1689
&& memcmp(p, "line ", 5) == 0)
1690
{
1691
p += 5;
1692
+
1693
+ // Before finding FILE:LINENO, make sure line has valid characters.
1694
+ const char* pcheck = p;
1695
+ while (pcheck < pend)
1696
+ {
1697
+ unsigned int c;
1698
+ bool issued_error;
1699
+ pcheck = this->advance_one_utf8_char(pcheck, &c, &issued_error);
1700
+ }
1701
1702
while (p < pend && *p == ' ')
1703
++p;
1704
const char* pcolon = static_cast<const char*>(memchr(p, ':', pend - p));
0 commit comments