Skip to content

Commit

Permalink
Fix control flow logic in sparsematrix
Browse files Browse the repository at this point in the history
  • Loading branch information
davidavdav committed Oct 17, 2016
1 parent bfbc7de commit 07276c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions base/sparse/sparsematrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -904,8 +904,7 @@ function _ispermutationvalid_permute!{Ti<:Integer,Tp<:Integer}(perm::AbstractVec
n = length(perm)
checkspace[1:n] = 0
for k in perm
checkspace[k] = xor(checkspace[k], 1)
(0 < k <= n) && (checkspace[k] == 1) || return false
(0 < k n) && ((checkspace[k] = xor(checkspace[k], 1)) == 1) || return false
end
return true
end
Expand Down

0 comments on commit 07276c0

Please sign in to comment.