Fix array bounds error caught by -fsanitize=address

This commit is contained in:
Eric Fischer
2017-04-13 14:23:43 -07:00
parent 510247c2fb
commit 242a657fc1
+1 -1
View File
@@ -1571,7 +1571,7 @@ int read_input(std::vector<source> &sources, char *fname, int &maxzoom, int minz
long long progress = -1; long long progress = -1;
long long ip; long long ip;
for (ip = 0; ip < indices; ip++) { for (ip = 1; ip < indices; ip++) {
if (map[ip].index != map[ip - 1].index) { if (map[ip].index != map[ip - 1].index) {
count++; count++;
sum += log(map[ip].index - map[ip - 1].index); sum += log(map[ip].index - map[ip - 1].index);