mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 01:59:19 +02:00
Poprawka na pusty rozkład.
This commit is contained in:
@@ -230,7 +230,7 @@ bool TTrainParameters::LoadTTfile(std::string scnpath, int iPlus, double vmax)
|
||||
else
|
||||
{ /*analiza rozk³adu jazdy*/
|
||||
ConversionError = 0;
|
||||
while (!(fin.bad() || (ConversionError != 0) || EndTable))
|
||||
while (fin.good() && !((ConversionError != 0) || EndTable))
|
||||
{
|
||||
std::getline(fin,lines); /*wczytanie linii*/
|
||||
if (lines.find("___________________") != std::string::npos) /*linia pozioma górna*/
|
||||
@@ -246,6 +246,11 @@ bool TTrainParameters::LoadTTfile(std::string scnpath, int iPlus, double vmax)
|
||||
} while (!(s == "|") || (fin.eof())); /*œrodkowy pion*/
|
||||
}
|
||||
}
|
||||
else if (lines == "")
|
||||
{
|
||||
fin.close();
|
||||
break;
|
||||
}
|
||||
fin >> s; /*nazwa poci¹gu*/
|
||||
// if LowerCase(s)<>ExtractFileName(TrainName) then {musi byæ taka sama, jak nazwa
|
||||
// pliku}
|
||||
|
||||
Reference in New Issue
Block a user