diff options
| author | Dave Parks <davep@lindenlab.com> | 2010-09-29 18:10:27 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2010-09-29 18:10:27 -0500 | 
| commit | 23b4dc61893f90abd49957a9b377312012fa0161 (patch) | |
| tree | 0d961db90558b15a6ef98b6db6fc7e1998cdc42c /indra/newview | |
| parent | 0c93da0501ab1debd6fa11af29a215be81f7b803 (diff) | |
Fix for serialization deprecation problems.
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llmeshrepository.cpp | 13 | 
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 5347b7313e..17b101e410 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -897,15 +897,24 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat  	{  		std::string res_str((char*) data, data_size); +		std::string deprecated_header("<? LLSD/Binary ?>"); + +		if (res_str.substr(0, deprecated_header.size()) == deprecated_header) +		{ +			res_str = res_str.substr(deprecated_header.size()+1, data_size); +			header_size = deprecated_header.size()+1; +		} +		data_size = res_str.size(); +  		std::istringstream stream(res_str); -		if (!LLSDSerialize::deserialize(header, stream, data_size)) +		if (!LLSDSerialize::fromBinary(header, stream, data_size))  		{  			llwarns << "Mesh header parse error.  Not a valid mesh asset!" << llendl;  			return false;  		} -		header_size = stream.tellg(); +		header_size += stream.tellg();  	}  	else  	{  | 
