diff options
author | Armin Weatherwax | 2010-03-12 18:51:54 +0100 |
---|---|---|
committer | Jacek Antonelli | 2010-03-13 01:29:24 -0600 |
commit | 72ed5da9f8b1577f799e78212da1cadc2d58aef7 (patch) | |
tree | 8f03bb845e0bdaaaab71d168ab1c0c60e4f2aa04 /linden/indra/newview/llhudeffectlookat.cpp | |
parent | Reactivated libELFIO for Linux64 (it wasn't causing the crash). (diff) | |
download | meta-impy-72ed5da9f8b1577f799e78212da1cadc2d58aef7.zip meta-impy-72ed5da9f8b1577f799e78212da1cadc2d58aef7.tar.gz meta-impy-72ed5da9f8b1577f799e78212da1cadc2d58aef7.tar.bz2 meta-impy-72ed5da9f8b1577f799e78212da1cadc2d58aef7.tar.xz |
Fixed a possible crash related to ShowLookAt targets.
Diffstat (limited to 'linden/indra/newview/llhudeffectlookat.cpp')
-rw-r--r-- | linden/indra/newview/llhudeffectlookat.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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) | |||
384 | 384 | ||
385 | U8 lookAtTypeUnpacked = 0; | 385 | U8 lookAtTypeUnpacked = 0; |
386 | htonmemcpy(&lookAtTypeUnpacked, &(packed_data[LOOKAT_TYPE]), MVT_U8, 1); | 386 | htonmemcpy(&lookAtTypeUnpacked, &(packed_data[LOOKAT_TYPE]), MVT_U8, 1); |
387 | if (lookAtTypeUnpacked > 10) | ||
388 | { | ||
389 | LL_DEBUGS("LookAt")<< "wrong lookAtTypeUnpacked: " << lookAtTypeUnpacked << LL_ENDL; | ||
390 | lookAtTypeUnpacked = 0; | ||
391 | } | ||
392 | |||
387 | mTargetType = (ELookAtType)lookAtTypeUnpacked; | 393 | mTargetType = (ELookAtType)lookAtTypeUnpacked; |
388 | 394 | ||
389 | if (mTargetType == LOOKAT_TARGET_NONE) | 395 | if (mTargetType == LOOKAT_TARGET_NONE) |