summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRye Cogtail <rye@lindenlab.com>2024-10-30 16:06:32 -0400
committerRye <rye@lindenlab.com>2024-10-30 22:08:07 -0700
commit914a955ea2c32e574af64d01d8c8be8ce9d23504 (patch)
treef6106923a76f22b81135605b407e54800e9b8b85 /indra/newview
parent067d568721ab65e5c806385a8c98d7a843ddf907 (diff)
Fix potential shift by -1 exponent in flexi object update
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llflexibleobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 7d098b2676..8897ad55e0 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -151,7 +151,6 @@ void LLVolumeImplFlexible::remapSections(LLFlexibleObjectSection *source, S32 so
{
S32 num_output_sections = 1<<dest_sections;
LLVector3 scale = mVO->mDrawable->getScale();
- F32 source_section_length = scale.mV[VZ] / (F32)(1<<source_sections);
F32 section_length = scale.mV[VZ] / (F32)num_output_sections;
if (source_sections == -1)
{
@@ -183,6 +182,7 @@ void LLVolumeImplFlexible::remapSections(LLFlexibleObjectSection *source, S32 so
// Iterate from right to left since it may be an in-place computation
S32 step_shift = dest_sections-source_sections;
S32 num_steps = 1<<step_shift;
+ F32 source_section_length = scale.mV[VZ] / (F32)(1<<source_sections);
for (S32 section=num_output_sections-num_steps; section>=0; section -= num_steps)
{
LLFlexibleObjectSection *last_source_section = &source[section>>step_shift];