Allow zone_nr > 999
This commit is contained in:
		@@ -399,11 +399,9 @@ int CALCULATE_LIBRARY_API get_zone_nr(int zone)
 | 
			
		||||
        QFile zone("/mnt/system_data/zone_nr");
 | 
			
		||||
        if (zone.exists()) {
 | 
			
		||||
            QFileInfo finfo(zone);
 | 
			
		||||
            if (finfo.size() <= 4) { // decimal 000\n
 | 
			
		||||
                if (zone.open(QIODevice::ReadOnly | QIODevice::Text)) {
 | 
			
		||||
                    QTextStream in(&zone);
 | 
			
		||||
                    return in.readLine(100).toInt();
 | 
			
		||||
                }
 | 
			
		||||
            if (zone.open(QIODevice::ReadOnly | QIODevice::Text)) {
 | 
			
		||||
                QTextStream in(&zone);
 | 
			
		||||
                return in.readLine(100).toInt();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return -1;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user