Skip to content

Commit

Permalink
fix: all-your-base read offset / len if rc is 0 (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
bushidocodes committed Dec 5, 2023
1 parent 46bb016 commit 014df74
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions exercises/practice/all-your-base/all-your-base.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ function convert(digits = [], inputBase, outputBase) {
outputBase
);

if (rc !== 0) {
return [[], rc];
}

const outputBuffer = currentInstance.get_mem_as_i32(
outputOffset,
outputLength
Expand Down

0 comments on commit 014df74

Please sign in to comment.