fixed a bug where received sscripts sometimes got an extra character when converted from vector<char> to string

This commit is contained in:
Joakim Kilby
2015-06-26 11:15:14 +02:00
parent 42dbf6a6a1
commit 06ca17326e

View File

@@ -345,8 +345,9 @@ namespace openspace {
}
//construct a script (string) from the data contained in the buffer
std::string script(buffer.data());
std::string script;
script.assign(buffer.begin(), buffer.end());
//tell the script engine to execute the script when appropriate
OsEng.scriptEngine()->queueScript(script);