Skip to content

Commit

Permalink
Handle potential off by one access
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth committed Feb 11, 2024
1 parent 706423b commit e2aaa07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void Sample::playRaw(sampleFrame* dst, size_t numFrames, const PlaybackState* st
break;
}

dst[i] = m_buffer->data()[m_reversed ? m_buffer->size() - index : index];
dst[i] = m_buffer->data()[m_reversed ? m_buffer->size() - index - 1 : index];
backwards ? --index : ++index;
}
}
Expand Down

0 comments on commit e2aaa07

Please sign in to comment.