From 7c029a5242697deb5807fb281b4f31334eca8d5c Mon Sep 17 00:00:00 2001 From: Pontus Fransson Date: Tue, 17 Dec 2013 10:58:07 +0100 Subject: [PATCH] Network - Fixed bugs --- Code/Network/NetworkAPI/CustomNetProtocol.cpp | 1 - Code/Network/NetworkAPI/Translator.cpp | 1 + Code/Network/NetworkDependencies/OysterByte.cpp | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Code/Network/NetworkAPI/CustomNetProtocol.cpp b/Code/Network/NetworkAPI/CustomNetProtocol.cpp index 1933d907..91fb7267 100644 --- a/Code/Network/NetworkAPI/CustomNetProtocol.cpp +++ b/Code/Network/NetworkAPI/CustomNetProtocol.cpp @@ -32,7 +32,6 @@ struct CustomNetProtocol::PrivateData attributes[i->first] = i->second; } } - attributes = o.attributes; } ~PrivateData() { diff --git a/Code/Network/NetworkAPI/Translator.cpp b/Code/Network/NetworkAPI/Translator.cpp index 75598b75..e321f31e 100644 --- a/Code/Network/NetworkAPI/Translator.cpp +++ b/Code/Network/NetworkAPI/Translator.cpp @@ -35,6 +35,7 @@ struct Translator::PrivateData auto end = ((MyCastingStruct*)protocol.privateData)->attributes.end(); size = 4; //size(int) + message.SetSize(0); message.PackInt(size, bytes); //Find all the data types diff --git a/Code/Network/NetworkDependencies/OysterByte.cpp b/Code/Network/NetworkDependencies/OysterByte.cpp index ec87a5f6..7cbbde58 100644 --- a/Code/Network/NetworkDependencies/OysterByte.cpp +++ b/Code/Network/NetworkDependencies/OysterByte.cpp @@ -44,6 +44,7 @@ void OysterByte::Resize(unsigned int cap) { delete[] byteArray; byteArray = new unsigned char[cap]; + capacity = cap; } }