Skip to content

Commit

Permalink
fix: SwapRows
Browse files Browse the repository at this point in the history
  • Loading branch information
rrr523 committed Dec 23, 2023
1 parent 329faaa commit f5f65ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/large-camels-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@bnb-chain/reed-solomon': patch
---

fix: SwapRows
2 changes: 1 addition & 1 deletion packages/reed-solomon/src/matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function gaussianElimination(m) {
if (m[r][r] === 0) {
for (let rowBelow = r + 1; rowBelow < rows; rowBelow++) {
if (m[rowBelow][r] !== 0) {
let err = SwapRows(r, rowBelow);
let err = SwapRows(m, r, rowBelow);
if (err !== null) {
return err;
}
Expand Down

0 comments on commit f5f65ce

Please sign in to comment.