Add a trailing newline.

Also check that the config was able to be read.
This commit is contained in:
pentarctagon 2020-06-12 22:36:19 -05:00
parent a7fe1feb10
commit ffc8837269
No known key found for this signature in database
GPG key ID: 29E48D667D52CCF3
2 changed files with 2 additions and 2 deletions

View file

@ -175,7 +175,7 @@ std::map<std::string, std::string> installed_addons_and_versions()
} else if(filesystem::file_exists(get_info_file_path(addon_id))) {
config temp;
get_addon_install_info(addon_id, temp);
addons[addon_id] = temp.child("info")["version"].str();
addons[addon_id] = !temp.empty() ? temp.child("info")["version"].str() : "Unknown";
} else {
addons[addon_id] = "Unknown";
}

View file

@ -503,7 +503,7 @@ std::string full_build_report()
o << addon_info.first << " : " << addon_info.second << '\n';
}
}
o << '\n';
return o.str();
}