Skip to content

Commit

Permalink
CarpetX: check array access in AnyTypeVector
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaas80 committed Dec 26, 2024
1 parent 3605564 commit 852808f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CarpetX/src/driver.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,12 @@ struct GHExt {
int typesize() const { return _typesize; };

const void *data_at(size_t i) const {
assert(i < _count);
return (char *)_data + i * _typesize;
};

void *data_at(size_t i) {
assert(i < _count);
return (char *)_data + i * _typesize;
};

Expand Down

0 comments on commit 852808f

Please sign in to comment.