Skip to content
Snippets Groups Projects
Commit 17a0b8b7 authored by Oliver Bock's avatar Oliver Bock Committed by Oliver Bock
Browse files

Improved sanity check

parent ea23ce5a
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "BOINCClientAdapter.h" #include "BOINCClientAdapter.h"
#include "Libxml2Adapter.h" #include "Libxml2Adapter.h"
#include <cstring>
#include <sstream> #include <sstream>
BOINCClientAdapter::BOINCClientAdapter(string sharedMemoryIdentifier) BOINCClientAdapter::BOINCClientAdapter(string sharedMemoryIdentifier)
...@@ -157,10 +156,11 @@ string BOINCClientAdapter::projectInformation() const ...@@ -157,10 +156,11 @@ string BOINCClientAdapter::projectInformation() const
{ {
string temp("<project_preferences />\n"); string temp("<project_preferences />\n");
if(strlen(m_UserData.project_preferences) > 0) { // preferences available? (BOINC initializes them with 0)
if(m_UserData.project_preferences != 0) {
// ugly workaround for incomplete XML fragment returned by BOINC! // ugly workaround for incomplete XML fragment returned by BOINC!
temp = "<project_preferences>\n"; temp = "<project_preferences>\n";
temp += m_UserData.project_preferences; temp += string(m_UserData.project_preferences);
temp += "</project_preferences>\n"; temp += "</project_preferences>\n";
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment