diff --git a/src/maplist.cpp b/src/maplist.cpp index 6bca5e03..63b821a6 100644 --- a/src/maplist.cpp +++ b/src/maplist.cpp @@ -19,8 +19,9 @@ QList MapList::load(const QString &fileName) return mapList; } - int ln = 1; + int ln = 0; while (!file.atEnd()) { + ln++; QByteArray line = file.readLine(); QList list = line.split('\t'); if (list.size() != 2) { @@ -33,8 +34,6 @@ QList MapList::load(const QString &fileName) mapList.append(new Map(QString::fromUtf8(ba1.data(), ba1.size()), QString::fromLatin1(ba2.data(), ba2.size()))); - - ln++; } return mapList;