1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fix tests

This commit is contained in:
Alexander Medvednikov 2019-07-05 22:12:06 +02:00
parent 8d407cec90
commit 68b7ae26b3

View File

@ -138,7 +138,7 @@ fn (s mut Scanner) skip_whitespace() {
for s.pos < s.text.len && is_white(s.text[s.pos]) {
if is_nl(s.text[s.pos]) {
// Count \r\n as one line
if !(s.text[s.pos] == `\n` && s.text[s.pos-1] == `\r`) {
if !(s.text[s.pos] == `\n` && s.pos > 0 && s.text[s.pos-1] == `\r`) {
s.line_nr++
}
if s.is_fmt {