Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmaykm committed Sep 16, 2015
1 parent fee7aff commit 00c7325
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/datafmt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function result{T}(dlmstore::DLMStore{T})
cells = dlmstore.data
sbuff = dlmstore.sbuff

if (lastcol < ncols) || (lastrow < nrows)
if (nrows > 0) && ((lastcol < ncols) || (lastrow < nrows))
while lastrow <= nrows
(lastcol == ncols) && (lastcol = 0; lastrow += 1)
for cidx in (lastcol+1):ncols
Expand Down
7 changes: 7 additions & 0 deletions test/readdlm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,10 @@ end
reshape(Any[1,2000.1,Float64(22222222222222222222222222222222222222),true,0x3,false,10e6,-10.34], 2, 4), Any)

@test isequaldlm(readcsv(IOBuffer("-9223355253176920979,9223355253176920979"), Int64), Int64[-9223355253176920979 9223355253176920979], Int64)

# fix #13028
for data in ["A B C", "A B C\n"]
data,hdr = readdlm(IOBuffer(data), header=true)
@test hdr == AbstractString["A" "B" "C"]
@test data == Array(Float64, 0, 3)
end

0 comments on commit 00c7325

Please sign in to comment.