Skip to content

Commit

Permalink
fix IOBuffer.write_sub calls for nel<:Integer
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmaykm committed Jun 16, 2015
1 parent 363678a commit 419dd2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/iobuffer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function write_sub{T}(to::AbstractIOBuffer, a::AbstractArray{T}, offs, nel)
local written::Int
if isbits(T) && isa(a,Array)
nb = nel * sizeof(T)
ensureroom(to, nb)
ensureroom(to, Int(nb))
ptr = (to.append ? to.size+1 : to.ptr)
written = min(nb, length(to.data) - ptr + 1)
copy!(to.data, ptr,
Expand Down

0 comments on commit 419dd2e

Please sign in to comment.