Skip to content

Commit

Permalink
[Examples] Fix out-of-bounds access (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmed256 authored Jan 20, 2021
1 parent 78292d4 commit 98b856c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/cpp/05_arrays/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ int main(int argc, const char **argv) {
}

// Uses the background device
occa::array<float> array_a(10);
occa::array<float> array_b(10);
occa::array<float> array_a(entries);
occa::array<float> array_b(entries);

// Copy over host data
array_a.copyFrom(a);
Expand Down

0 comments on commit 98b856c

Please sign in to comment.