Skip to content

Commit

Permalink
fix for issue 171
Browse files Browse the repository at this point in the history
  • Loading branch information
hoene committed Oct 18, 2021
1 parent 9268388 commit e846c89
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Expand Up @@ -87,7 +87,8 @@ if(BUILD_TESTS)
163
167a
167b
168
168
171
)
# issues with osx 96)
add_test(fail-issue-${ISSUE} ${PROJECT_SOURCE_DIR}/tests/notcrashed.sh
Expand Down
2 changes: 1 addition & 1 deletion src/hrtf/loudness.c
Expand Up @@ -27,7 +27,7 @@ MYSOFA_EXPORT float mysofa_loudness(struct MYSOFA_HRTF *hrtf) {
/*
* find frontal source position
*/
for (i = 0; i < hrtf->SourcePosition.elements; i += hrtf->C) {
for (i = 0; i + 2 < hrtf->SourcePosition.elements; i += hrtf->C) {
c[0] = hrtf->SourcePosition.values[i];
c[1] = hrtf->SourcePosition.values[i + 1];
c[2] = hrtf->SourcePosition.values[i + 2];
Expand Down
Binary file added tests/fail-issue-171.sofa
Binary file not shown.

0 comments on commit e846c89

Please sign in to comment.