Skip to content

Commit

Permalink
Fix #4284
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Sep 16, 2013
1 parent fc445f8 commit a4088e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/subarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function sub(A::SubArray, i::RangeIndex...)
else
r = A.indexes[k]
ri = (isa(i[j],Int) && j<=L) ? (i[j]:i[j]) : i[j]
newindexes[k] = first(r) + (ri-1)*step(r)
newindexes[k] = step(r) == 1 ? (first(r)-1) + ri : first(r) + (ri-1)*step(r)
j += 1
end
end
Expand Down

0 comments on commit a4088e0

Please sign in to comment.