mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-27 07:15:37 +00:00
Fix potential crashes
- some compilers have problems with using locally redeclared loop vars after an internal loop - fix ordering of conditional checks
This commit is contained in:
parent
65099897f4
commit
0db6e1bc57
3 changed files with 6 additions and 6 deletions
|
|
@ -408,7 +408,7 @@ String Path::getDirectory(U32 count) const
|
|||
|
||||
U32 end = offset;
|
||||
|
||||
while (mPath[end] != '/' && end < mPath.length())
|
||||
while (end < mPath.length() && mPath[end] != '/')
|
||||
end++;
|
||||
|
||||
return mPath.substr(offset,end - offset);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue