@@ -774,7 +774,7 @@ function _triscale!(A::UpperOrUnitUpperTriangular, B::UnitUpperTriangular, c::Nu
774774    checksize1 (A, B)
775775    _iszero_alpha (_add) &&  return  _rmul_or_fill! (A, _add. beta)
776776    for  j in  axes (B. data,2 )
777-         @inbounds  _modify! (_add, c, A, (j,j))
777+         @inbounds  _modify! (_add, B[ BandIndex ( 0 ,j)]  *   c, A, (j,j))
778778        for  i in  firstindex (B. data,1 ): (j -  1 )
779779            @inbounds  _modify! (_add, B. data[i,j] *  c, A. data, (i,j))
780780        end 
@@ -785,7 +785,7 @@ function _triscale!(A::UpperOrUnitUpperTriangular, c::Number, B::UnitUpperTriang
785785    checksize1 (A, B)
786786    _iszero_alpha (_add) &&  return  _rmul_or_fill! (A, _add. beta)
787787    for  j in  axes (B. data,2 )
788-         @inbounds  _modify! (_add, c, A, (j,j))
788+         @inbounds  _modify! (_add, c  *  B[ BandIndex ( 0 ,j)] , A, (j,j))
789789        for  i in  firstindex (B. data,1 ): (j -  1 )
790790            @inbounds  _modify! (_add, c *  B. data[i,j], A. data, (i,j))
791791        end 
@@ -816,7 +816,7 @@ function _triscale!(A::LowerOrUnitLowerTriangular, B::UnitLowerTriangular, c::Nu
816816    checksize1 (A, B)
817817    _iszero_alpha (_add) &&  return  _rmul_or_fill! (A, _add. beta)
818818    for  j in  axes (B. data,2 )
819-         @inbounds  _modify! (_add, c, A, (j,j))
819+         @inbounds  _modify! (_add, B[ BandIndex ( 0 ,j)]  * c, A, (j,j))
820820        for  i in  (j +  1 ): lastindex (B. data,1 )
821821            @inbounds  _modify! (_add, B. data[i,j] *  c, A. data, (i,j))
822822        end 
@@ -827,7 +827,7 @@ function _triscale!(A::LowerOrUnitLowerTriangular, c::Number, B::UnitLowerTriang
827827    checksize1 (A, B)
828828    _iszero_alpha (_add) &&  return  _rmul_or_fill! (A, _add. beta)
829829    for  j in  axes (B. data,2 )
830-         @inbounds  _modify! (_add, c, A, (j,j))
830+         @inbounds  _modify! (_add, c  *  B[ BandIndex ( 0 ,j)] , A, (j,j))
831831        for  i in  (j +  1 ): lastindex (B. data,1 )
832832            @inbounds  _modify! (_add, c *  B. data[i,j], A. data, (i,j))
833833        end 
0 commit comments