diff --git a/src/tools/trackgen/ac3d.cpp b/src/tools/trackgen/ac3d.cpp index 56bfb4600..56d263057 100644 --- a/src/tools/trackgen/ac3d.cpp +++ b/src/tools/trackgen/ac3d.cpp @@ -1058,7 +1058,7 @@ void Ac3d::addDefaultMaterial() void Ac3d::readFile(const std::string &fileName) { - std::ifstream fin(fileName); + std::ifstream fin(fileName, std::ios::binary); if (!fin) throw Exception("Couldn't open file"); @@ -1082,7 +1082,7 @@ void Ac3d::readFile(const std::string &fileName) tokenizeLine(line, tokens); - if (tokens.empty()) + if (tokens.empty() || tokens[0].empty()) continue; if (tokens.at(0) == "MATERIAL") materials.emplace_back(tokens); diff --git a/src/tools/trackgen/main.cpp b/src/tools/trackgen/main.cpp index 6660867ce..6f8fe6d29 100644 --- a/src/tools/trackgen/main.cpp +++ b/src/tools/trackgen/main.cpp @@ -98,7 +98,7 @@ public: //! Constructor. Application::Application() -: GfApplication("TrackGen", "1.6.0.30", "Terrain generator for tracks") +: GfApplication("TrackGen", "1.6.0.31", "Terrain generator for tracks") , HeightSteps(30) , Bump(false) , Raceline(false)