diff options
Diffstat (limited to 'linden/indra/newview/llhudeffecttrail.cpp')
-rw-r--r-- | linden/indra/newview/llhudeffecttrail.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/linden/indra/newview/llhudeffecttrail.cpp b/linden/indra/newview/llhudeffecttrail.cpp index fed3a9e..79c05d7 100644 --- a/linden/indra/newview/llhudeffecttrail.cpp +++ b/linden/indra/newview/llhudeffecttrail.cpp | |||
@@ -112,17 +112,19 @@ void LLHUDEffectSpiral::packData(LLMessageSystem *mesgsys) | |||
112 | 112 | ||
113 | void LLHUDEffectSpiral::unpackData(LLMessageSystem *mesgsys, S32 blocknum) | 113 | void LLHUDEffectSpiral::unpackData(LLMessageSystem *mesgsys, S32 blocknum) |
114 | { | 114 | { |
115 | U8 packed_data[56]; | 115 | const size_t EFFECT_SIZE = 56; |
116 | U8 packed_data[EFFECT_SIZE]; | ||
116 | 117 | ||
117 | LLHUDEffect::unpackData(mesgsys, blocknum); | 118 | LLHUDEffect::unpackData(mesgsys, blocknum); |
118 | LLUUID object_id, target_object_id; | 119 | LLUUID object_id, target_object_id; |
119 | S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData); | 120 | S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData); |
120 | if (size != 56) | 121 | if (size != EFFECT_SIZE) |
121 | { | 122 | { |
122 | llwarns << "Spiral effect with bad size " << size << llendl; | 123 | llwarns << "Spiral effect with bad size " << size << llendl; |
123 | return; | 124 | return; |
124 | } | 125 | } |
125 | mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, 56, blocknum); | 126 | mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, |
127 | packed_data, EFFECT_SIZE, blocknum, EFFECT_SIZE); | ||
126 | 128 | ||
127 | htonmemcpy(object_id.mData, packed_data, MVT_LLUUID, 16); | 129 | htonmemcpy(object_id.mData, packed_data, MVT_LLUUID, 16); |
128 | htonmemcpy(target_object_id.mData, packed_data + 16, MVT_LLUUID, 16); | 130 | htonmemcpy(target_object_id.mData, packed_data + 16, MVT_LLUUID, 16); |