Show just a short build info at the application toolbar even on OSX.

This commit is contained in:
bubnikv 2020-03-25 14:35:29 +01:00
parent 4656102dba
commit faf8df7864

View file

@ -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)