mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-25 02:11:03 +02:00
fix readEntityIDFromBuffer
This commit is contained in:
parent
d618b4226b
commit
b113c2d55c
1 changed files with 3 additions and 2 deletions
|
@ -589,8 +589,9 @@ EntityItemID EntityItem::readEntityItemIDFromBuffer(const unsigned char* data, i
|
|||
EntityItemID result;
|
||||
if (bytesLeftToRead >= sizeof(uint32_t)) {
|
||||
// id
|
||||
uint32_t id;
|
||||
memcpy(&id, data, sizeof(id));
|
||||
QByteArray encodedID((const char*)data, bytesLeftToRead);
|
||||
ByteCountCoded<quint32> idCoder = encodedID;
|
||||
quint32 id = idCoder;
|
||||
result.id = id;
|
||||
result.isKnownID = true;
|
||||
result.creatorTokenID = UNKNOWN_MODEL_TOKEN;
|
||||
|
|
Loading…
Reference in a new issue