mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Merge pull request #547 from asmaloney/fix_potential_crashes
Fix potential crashes
This commit is contained in:
commit
835649aa2f
3 changed files with 6 additions and 6 deletions
|
|
@ -3303,9 +3303,9 @@ void ShapeBase::unpackUpdate(NetConnection *con, BitStream *stream)
|
||||||
image.triggerDown = stream->readFlag();
|
image.triggerDown = stream->readFlag();
|
||||||
image.altTriggerDown = stream->readFlag();
|
image.altTriggerDown = stream->readFlag();
|
||||||
|
|
||||||
for (U32 i=0; i<ShapeBaseImageData::MaxGenericTriggers; ++i)
|
for (U32 j=0; j<ShapeBaseImageData::MaxGenericTriggers; ++j)
|
||||||
{
|
{
|
||||||
image.genericTrigger[i] = stream->readFlag();
|
image.genericTrigger[j] = stream->readFlag();
|
||||||
}
|
}
|
||||||
|
|
||||||
int count = stream->readInt(3);
|
int count = stream->readInt(3);
|
||||||
|
|
|
||||||
|
|
@ -408,7 +408,7 @@ String Path::getDirectory(U32 count) const
|
||||||
|
|
||||||
U32 end = offset;
|
U32 end = offset;
|
||||||
|
|
||||||
while (mPath[end] != '/' && end < mPath.length())
|
while (end < mPath.length() && mPath[end] != '/')
|
||||||
end++;
|
end++;
|
||||||
|
|
||||||
return mPath.substr(offset,end - offset);
|
return mPath.substr(offset,end - offset);
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ U32 GFXDrawUtil::drawTextN( GFont *font, const Point2I &ptDraw, const UTF16 *in_
|
||||||
|
|
||||||
U32 i;
|
U32 i;
|
||||||
UTF16 c;
|
UTF16 c;
|
||||||
for(i = 0, c = in_string[i]; in_string[i] && i < n; i++, c = in_string[i])
|
for (i = 0, c = in_string[i]; i < n && in_string[i]; i++, c = in_string[i])
|
||||||
{
|
{
|
||||||
switch(c)
|
switch(c)
|
||||||
{
|
{
|
||||||
|
|
@ -445,7 +445,7 @@ void GFXDrawUtil::drawRect( const Point2F &upperLeft, const Point2F &lowerRight,
|
||||||
// Into Triangle-Strip Outline
|
// Into Triangle-Strip Outline
|
||||||
// v0-----------v2
|
// v0-----------v2
|
||||||
// | a x |
|
// | a x |
|
||||||
// | v1-----v3 |
|
// | v1-----v3 |
|
||||||
// | | | |
|
// | | | |
|
||||||
// | v7-----v5 |
|
// | v7-----v5 |
|
||||||
// | x b |
|
// | x b |
|
||||||
|
|
@ -512,7 +512,7 @@ void GFXDrawUtil::drawRectFill( const Point2F &upperLeft, const Point2F &lowerRi
|
||||||
// Into Quad
|
// Into Quad
|
||||||
// v0---------v1
|
// v0---------v1
|
||||||
// | a x |
|
// | a x |
|
||||||
// | |
|
// | |
|
||||||
// | x b |
|
// | x b |
|
||||||
// v2---------v3
|
// v2---------v3
|
||||||
//
|
//
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue