Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
chitalu committed Feb 18, 2024
1 parent 297f1c4 commit 28daefc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/frontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2035,15 +2035,15 @@ void get_connected_component_data_impl_detail(
case MC_CONNECTED_COMPONENT_DATA_DISPATCH_PERTURBATION_VECTOR: {
SCOPED_TIMER("MC_CONNECTED_COMPONENT_DATA_DISPATCH_PERTURBATION_VECTOR");
if (pMem == nullptr) {
*pNumBytes = sizeof(vec3);
*pNumBytes = sizeof(McDouble)*3;
} else {
if (bytes > sizeof(vec3)) {
if (bytes > sizeof(McDouble)*3) {
throw std::invalid_argument("out of bounds memory access");
}
if (bytes % sizeof(vec3) != 0) {
if (bytes % (sizeof(McDouble)*3) != 0) {
throw std::invalid_argument("invalid number of bytes");
}

((McDouble*)pMem)[0] = cc_uptr->perturbation_vector[0];
((McDouble*)pMem)[1] = cc_uptr->perturbation_vector[1];
((McDouble*)pMem)[2] = cc_uptr->perturbation_vector[2];
Expand Down

0 comments on commit 28daefc

Please sign in to comment.