hla: Fix buffer overrun in SGMath vector types.
This commit is contained in:
parent
92f7445bb9
commit
a563cfd0f2
@ -214,7 +214,7 @@ public:
|
|||||||
|
|
||||||
virtual bool setNumElements(unsigned count)
|
virtual bool setNumElements(unsigned count)
|
||||||
{
|
{
|
||||||
for (unsigned i = 2; i < count; ++i)
|
for (unsigned i = count; i < 2; ++i)
|
||||||
_value[i] = 0;
|
_value[i] = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -306,7 +306,7 @@ public:
|
|||||||
|
|
||||||
virtual bool setNumElements(unsigned count)
|
virtual bool setNumElements(unsigned count)
|
||||||
{
|
{
|
||||||
for (unsigned i = 3; i < count; ++i)
|
for (unsigned i = count; i < 3; ++i)
|
||||||
_value[i] = 0;
|
_value[i] = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -398,7 +398,7 @@ public:
|
|||||||
|
|
||||||
virtual bool setNumElements(unsigned count)
|
virtual bool setNumElements(unsigned count)
|
||||||
{
|
{
|
||||||
for (unsigned i = 4; i < count; ++i)
|
for (unsigned i = count; i < 4; ++i)
|
||||||
_value[i] = 0;
|
_value[i] = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -490,7 +490,7 @@ public:
|
|||||||
|
|
||||||
virtual bool setNumElements(unsigned count)
|
virtual bool setNumElements(unsigned count)
|
||||||
{
|
{
|
||||||
for (unsigned i = 4; i < count; ++i)
|
for (unsigned i = count; i < 4; ++i)
|
||||||
_value[i] = 0;
|
_value[i] = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user