From 08fbdfce43c30cb4662c0bc04561f3359fa9ca42 Mon Sep 17 00:00:00 2001 From: phr0z3nt04st Date: Mon, 7 Jun 2010 19:07:37 -0500 Subject: [PATCH] More message logging bugs fixed... --- indra/llmessage/llmessagelog.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/indra/llmessage/llmessagelog.cpp b/indra/llmessage/llmessagelog.cpp index 3d715fa97..378c275b9 100644 --- a/indra/llmessage/llmessagelog.cpp +++ b/indra/llmessage/llmessagelog.cpp @@ -9,17 +9,21 @@ LLMessageLogEntry::LLMessageLogEntry(EType type, LLHost from_host, LLHost to_hos { if(data) { - mData.resize(data_size/sizeof(U8)); - mData.assign(data,data + data_size/sizeof(U8)); + mData.resize(data_size); + mData.assign(data,data + data_size); } } LLMessageLogEntry::LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, std::vector data, S32 data_size) : mType(type), mFromHost(from_host), mToHost(to_host), - mDataSize(data_size), - mData(data) + mDataSize(data_size) { + if(data.size()) + { + mData.resize(data.size()); + std::copy(data.begin(),data.end(),mData.begin()); + } } LLMessageLogEntry::~LLMessageLogEntry() {