Fix indexing bugs in the original TTS code (#3423)

This commit is contained in:
peterbrant14
2020-04-28 17:45:21 +01:00
committed by GitHub
parent 2e228ef52b
commit 0fab9b901a
2 changed files with 2 additions and 2 deletions

View File

@@ -836,7 +836,7 @@ bool TTSReader::loadHeaders() {
if (basis != Slope && slopeCount) {
while (si.WantsInput(p.getDistanceFromStart())) {
if (slopeIdx >= frameMapCount) {
if (slopeIdx >= slopeCount) {
si.NotifyInputComplete();
break;
}

View File

@@ -888,7 +888,7 @@ void ErgFile::parseTTS()
alt = ttsPoints[0].getElevation();
}
for (int i = 0; i <= pointCount; i++) { // first data point is actually the last...
for (int i = 0; i < pointCount; i++) { // first data point is actually the last...
ErgFilePoint add;
prevPoint = point;