1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-16 05:27:43 +00:00

Fixed dumb out-of-bounds access error.

This commit is contained in:
Thomas Harte
2017-06-22 22:28:50 -04:00
parent aec4fd066b
commit 919fc48cc5

View File

@@ -64,7 +64,7 @@ void Parser::inspect_waves(const std::vector<WaveType> &waves) {
// Count the number of pulses at the start of this vector // Count the number of pulses at the start of this vector
size_t number_of_pulses = 0; size_t number_of_pulses = 0;
while(waves[number_of_pulses + wave_offset] == WaveType::Pulse && number_of_pulses < waves.size()) { while(number_of_pulses + wave_offset < waves.size() && waves[number_of_pulses + wave_offset] == WaveType::Pulse) {
number_of_pulses++; number_of_pulses++;
} }