mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-12-29 11:00:28 +01:00
deepcopy result if result === X to prevent X from zeroing
This commit is contained in:
parent
5a3e2761a4
commit
b80db52742
@ -331,8 +331,11 @@ function mul!{T}(result::AbstractVector{T}, X::AbstractVector{T}, Y::AbstractVec
|
||||
end
|
||||
end
|
||||
|
||||
function mul!(result::GroupRingElem, X::GroupRingElem, Y::GroupRingElem)
|
||||
result.coeffs *= 0
|
||||
function mul!{T}(result::GroupRingElem{T}, X::GroupRingElem{T}, Y::GroupRingElem{T})
|
||||
# @show result === X
|
||||
if result === X
|
||||
result = deepcopy(result)
|
||||
end
|
||||
mul!(result.coeffs, X.coeffs, Y.coeffs, parent(X).pm)
|
||||
return result
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user