Handle fasta with no line breaks.
[lightning.git] / tilelib.go
index 289f8895e5ba420b00d0d449f9a916cfcaf5d4f5..6acd8d6a26f9f91a07e30b8803bab04d95d57a7a 100644 (file)
@@ -556,6 +556,7 @@ func (tilelib *tileLibrary) TileFasta(filelabel string, rdr io.Reader, matchChro
        }
        todo := make(chan jobT, 1)
        scanner := bufio.NewScanner(rdr)
+       scanner.Buffer(make([]byte, 256), 1<<29) // 512 MiB, in case fasta does not have line breaks
        go func() {
                defer close(todo)
                var fasta []byte