From 3e1a8023721531f2cb64de9db1bb40234d757733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20O=27Mara?= Date: Sun, 12 Apr 2020 17:28:16 +1000 Subject: [PATCH] Ensure fields are empty --- src/sam/reader.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sam/reader.jl b/src/sam/reader.jl index 3270957..24152c4 100644 --- a/src/sam/reader.jl +++ b/src/sam/reader.jl @@ -83,6 +83,8 @@ end function Base.read!(rdr::Reader, rec::Record) + empty!(rec.fields) #Note: data is pushed to the fields field, and other field data is overwritten. #TODO: distinguish for inplace reading pattern. + cs, ln, f = readrecord!(rdr.state.stream, rec, (rdr.state.state, rdr.state.linenum)) rdr.state.state = cs