Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -1143,10 +1143,11 @@ void Application::editPreferences() { · 1142 unmodified lines | |||
| 1143 | return; | 1143 | return; |
| 1144 | } | 1144 | } |
| 1145 | 1145 | ||
| 1146 | const char* newHostname = domainServerHostname->text().toStdString().c_str(); | 1146 | char newHostname[MAX_HOSTNAME_BYTES] = {}; |
| 1147 | 1147 | memcpy(newHostname, domainServerHostname->text().toAscii().data(), domainServerHostname->text().size()); | |
| 1148 | |||
| 1148 | // check if the domain server hostname is new | 1149 | // check if the domain server hostname is new |
| 1149 | if (memcmp(NodeList::getInstance()->getDomainHostname(), newHostname, sizeof(&newHostname)) != 0) { | 1150 | if (memcmp(NodeList::getInstance()->getDomainHostname(), newHostname, strlen(newHostname)) != 0) { |
| 1150 | // if so we need to clear the nodelist and delete the existing voxel and environment data | 1151 | // if so we need to clear the nodelist and delete the existing voxel and environment data |
| 1151 | Node *voxelServer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_VOXEL_SERVER); | 1152 | Node *voxelServer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_VOXEL_SERVER); |
| 1152 | 1153 | ||