From 0548df9a767c169eb3014df0fdee681c4564fa42 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Sun, 14 Nov 2021 20:53:35 +0100 Subject: [PATCH] Fixed parsing of older PrusaSlicer.ini files. --- src/slic3r/GUI/GUI_App.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 07c2524d4..e044056e6 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -812,13 +812,11 @@ static boost::optional parse_semver_from_ini(std::string path) std::stringstream buffer; buffer << stream.rdbuf(); std::string body = buffer.str(); - size_t end_line = body.find_first_of("\n\r"); - body.resize(end_line); size_t start = body.find("PrusaSlicer "); if (start == std::string::npos) return boost::none; body = body.substr(start + 12); - size_t end = body.find_first_of(" \n\r"); + size_t end = body.find_first_of(" \n"); if (end < body.size()) body.resize(end); return Semver::parse(body);