From 014df74c2c0e43eb9b36241b7899ed31345e9ca5 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Tue, 5 Dec 2023 06:02:40 -0500 Subject: [PATCH] fix: all-your-base read offset / len if rc is 0 (#95) --- exercises/practice/all-your-base/all-your-base.spec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exercises/practice/all-your-base/all-your-base.spec.js b/exercises/practice/all-your-base/all-your-base.spec.js index 2944c54..35393ac 100644 --- a/exercises/practice/all-your-base/all-your-base.spec.js +++ b/exercises/practice/all-your-base/all-your-base.spec.js @@ -31,6 +31,10 @@ function convert(digits = [], inputBase, outputBase) { outputBase ); + if (rc !== 0) { + return [[], rc]; + } + const outputBuffer = currentInstance.get_mem_as_i32( outputOffset, outputLength