Add a trailing newline.

Also check that the config was able to be read.
This commit is contained in:
Pentarctagon 2020-06-12 22:23:29 -05:00
parent 9ecfdae09b
commit 4df1193c11
No known key found for this signature in database
GPG key ID: 29E48D667D52CCF3
2 changed files with 2 additions and 1 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

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