mirror of https://github.com/golang/go.git
parent
d5f4d94b80
commit
e4a1fb7e94
|
|
@ -387,7 +387,7 @@ func (S *Scanner) LineCol(pos int) (line, col int) {
|
|||
}
|
||||
|
||||
for i := 0; i < pos; i++ {
|
||||
if src[i] != '\n' {
|
||||
if src[i] == '\n' {
|
||||
line++;
|
||||
lpos = i;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue