Changeset 1495 in ntrip


Ignore:
Timestamp:
Jan 18, 2009, 11:33:12 AM (15 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncrinex.cpp

    r1387 r1495  
    129129    if (line.indexOf("STR") == 0) {
    130130      QStringList tags = line.split(";");
    131       if (tags.at(1) == _mountPoint.path().mid(1).toAscii()) {
    132         net = tags.at(7);
    133         break;
     131      if (tags.size() > 7) {
     132        if (tags.at(1) == _mountPoint.path().mid(1).toAscii()) {
     133          net = tags.at(7);
     134          break;
     135        }
    134136      }
    135137    }
    136138  }
    137139  QString sklDir;
    138   it.toFront();
    139   while (it.hasNext()) {
    140     QString line = it.next();
    141     if (line.indexOf("NET") == 0) {
    142       QStringList tags = line.split(";");
    143       if (tags.at(1) == net) {
    144         sklDir = tags.at(6).trimmed();
    145         break;
    146       }         
     140  if (!net.isEmpty()) {
     141    it.toFront();
     142    while (it.hasNext()) {
     143      QString line = it.next();
     144      if (line.indexOf("NET") == 0) {
     145        QStringList tags = line.split(";");
     146        if (tags.size() > 6) {
     147          if (tags.at(1) == net) {
     148            sklDir = tags.at(6).trimmed();
     149            break;
     150          }
     151        }         
     152      }
    147153    }
    148154  }
Note: See TracChangeset for help on using the changeset viewer.