Skip to content

Commit 95313b8

Browse files
committed
fix: address off-by-one bug
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent c52126b commit 95313b8

File tree

1 file changed

+1
-1
lines changed
  • lib/node_modules/@stdlib/ndarray/base/every/lib

1 file changed

+1
-1
lines changed

lib/node_modules/@stdlib/ndarray/base/every/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ function every( arrays ) {
314314
xmmv = minmaxViewBufferIndex( shx, sx, x.offset );
315315

316316
// Determine whether we can ignore shape (and strides) and treat the ndarray as a linear one-dimensional strided array...
317-
if ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+1 ) ) ) { // eslint-disable-line max-len
317+
if ( len === ( xmmv[1]-xmmv[0]+1 ) || ( isCmplx && len*2 === ( xmmv[1]-xmmv[0]+2 ) ) ) { // eslint-disable-line max-len
318318
// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...
319319
if ( iox === 1 ) {
320320
ox = xmmv[ 0 ];

0 commit comments

Comments
 (0)