Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 2 files). Show all
Unified · Split
| @@ -237,20 +237,14 @@ void EntityScriptServer::handleEntityScriptCallMethodPacket(QSharedPointer<Recei · 236 unmodified lines | ||
| 237 | 237 | if (_entitiesScriptEngine && _entityViewer.getTree() && !_shuttingDown) { |
| 238 | 238 | auto entityID = QUuid::fromRfc4122(receivedMessage->read(NUM_BYTES_RFC4122_UUID)); |
| 239 | 239 | |
| 240 | − quint16 methodLength; | |
| 241 | − receivedMessage->readPrimitive(&methodLength); | |
| 242 | − auto methodData = receivedMessage->read(methodLength); | |
| 243 | − auto method = QString::fromUtf8(methodData); | |
| 240 | + auto method = receivedMessage->readString(); | |
| 244 | 241 | |
| 245 | 242 | quint16 paramCount; |
| 246 | 243 | receivedMessage->readPrimitive(¶mCount); |
| 247 | 244 | |
| 248 | 245 | QStringList params; |
| 249 | 246 | for (int param = 0; param < paramCount; param++) { |
| 250 | − quint16 paramLength; | |
| 251 | − receivedMessage->readPrimitive(¶mLength); | |
| 252 | − auto paramData = receivedMessage->read(paramLength); | |
| 253 | − auto paramString = QString::fromUtf8(paramData); | |
| 247 | + auto paramString = receivedMessage->readString(); | |
| 254 | 248 | params << paramString; |
| 255 | 249 | } |
| 256 | 250 | |