Skip to content

Bug: CovColl.isCovPresent off-by-one excludes last covariate #17

@iahncajigas

Description

@iahncajigas

Bug Description

In CovColl.m, the isCovPresent method uses strict less-than when checking index bounds:

if((cov>0)&&(cov<ccObj.numCov))

With 1-based indexing, if numCov=2, valid indices are 1 and 2. But cov < numCov (i.e., 2 < 2) evaluates to false, incorrectly reporting that the last covariate is not present.

Expected Fix

if((cov>0)&&(cov<=ccObj.numCov))

Found during comprehensive cross-toolbox audit. Fixed in Python nSTAT-python PR #54.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions