From 72ed5da9f8b1577f799e78212da1cadc2d58aef7 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Fri, 12 Mar 2010 18:51:54 +0100 Subject: Fixed a possible crash related to ShowLookAt targets. --- linden/indra/newview/llhudeffectlookat.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'linden/indra/newview/llhudeffectlookat.cpp') diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp index b54101e..b18fc62 100644 --- a/linden/indra/newview/llhudeffectlookat.cpp +++ b/linden/indra/newview/llhudeffectlookat.cpp @@ -384,6 +384,12 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) U8 lookAtTypeUnpacked = 0; htonmemcpy(&lookAtTypeUnpacked, &(packed_data[LOOKAT_TYPE]), MVT_U8, 1); + if (lookAtTypeUnpacked > 10) + { + LL_DEBUGS("LookAt")<< "wrong lookAtTypeUnpacked: " << lookAtTypeUnpacked << LL_ENDL; + lookAtTypeUnpacked = 0; + } + mTargetType = (ELookAtType)lookAtTypeUnpacked; if (mTargetType == LOOKAT_TARGET_NONE) -- cgit v1.1