History

correct reference to new hostname for Qt temp variable changes

Stephen Birarda committed 13 years ago

Commit 45d82dc1 parent 4dd6afc2 files · +5 −4Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+4−3
@@ -1143,10 +1143,11 @@ void Application::editPreferences() { · 1142 unmodified lines
11431143 return;
11441144 }
11451145
1146− const char* newHostname = domainServerHostname->text().toStdString().c_str();
1147−
1146+ char newHostname[MAX_HOSTNAME_BYTES] = {};
1147+ memcpy(newHostname, domainServerHostname->text().toAscii().data(), domainServerHostname->text().size());
1148+
11481149 // 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) {
11501151 // if so we need to clear the nodelist and delete the existing voxel and environment data
11511152 Node *voxelServer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_VOXEL_SERVER);
11521153

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t