Skip to content

Commit 20a80ec

Browse files
authored
Merge pull request #87 from simonbyrne/sb/rdata
remove newline check from Rdata
2 parents c2b2127 + 9e2f940 commit 20a80ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/registry.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ function detect_rdata(io)
88
seekstart(io)
99
read(io, UInt8) == UInt8('R') &&
1010
read(io, UInt8) == UInt8('D') &&
11-
(fmt = read(io, UInt8); fmt == UInt8('A') || fmt == UInt8('B') || fmt == UInt8('X')) &&
11+
read(io, UInt8) in (UInt8('A'), UInt8('B'), UInt8('X')) &&
1212
read(io, UInt8) == UInt8('2') &&
13-
read(io, UInt8) == 0x0A
13+
(c = read(io, UInt8); c == UInt8('\n') || (c == UInt8('\r') && read(io, UInt8) == UInt8('\n')))
1414
end
1515

1616
add_format(format"RData", detect_rdata, [".rda", ".RData", ".rdata"], [:RData, LOAD])

0 commit comments

Comments
 (0)