X-Git-Url: http://www.git.cypherpunks.ru/?p=gorecfile.git;a=blobdiff_plain;f=r.go;h=5de2a455a4f5d0c315c406bd1d1aa3a56c3a375e;hp=1cd3cb6071a6c6d345f108561dbeb5fb4ee95f71;hb=a24ce24d791284ed7ded63fc824c1c4e239d6d6d;hpb=9395de748e74e117bcc36d22e4223952d35bdc33 diff --git a/r.go b/r.go index 1cd3cb6..5de2a45 100644 --- a/r.go +++ b/r.go @@ -80,7 +80,9 @@ func (r *Reader) Next() ([]Field, error) { text = r.scanner.Text() if continuation { - if text[len(text)-1] == '\\' { + if len(text) == 0 { + continuation = false + } else if text[len(text)-1] == '\\' { lines = append(lines, text[:len(text)-1]) } else { lines = append(lines, text)