From faf8df786427a7be539a57ca02b3d334e88a0998 Mon Sep 17 00:00:00 2001 From: bubnikv <bubnikv@gmail.com> Date: Wed, 25 Mar 2020 14:35:29 +0100 Subject: [PATCH] Show just a short build info at the application toolbar even on OSX. --- src/slic3r/GUI/MainFrame.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 1e22359ab..a148325dd 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -214,7 +214,8 @@ void MainFrame::update_title() if (idx_plus != build_id.npos) { // Parse what is behind the '+'. If there is a number, then it is a build number after the label, and full build ID is shown. int commit_after_label; - if (! boost::starts_with(build_id.data() + idx_plus + 1, "UNKNOWN") && sscanf(build_id.data() + idx_plus + 1, "%d-", &commit_after_label) == 0) { + if (! boost::starts_with(build_id.data() + idx_plus + 1, "UNKNOWN") && + (build_id.at(idx_plus + 1) == '-' || sscanf(build_id.data() + idx_plus + 1, "%d-", &commit_after_label) == 0)) { // It is a release build. build_id.erase(build_id.begin() + idx_plus, build_id.end()); #if defined(_WIN32) && ! defined(_WIN64)