mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Fix potential index out of bounds
This commit is contained in:
parent
11a9edd263
commit
2efd5f0acd
1 changed files with 2 additions and 2 deletions
|
|
@ -490,8 +490,8 @@ DefineEngineFunction(getDirectoryList, String, ( const char* path, S32 depth ),
|
||||||
if (fullpath[dStrlen(fullpath) - 1] != '/')
|
if (fullpath[dStrlen(fullpath) - 1] != '/')
|
||||||
{
|
{
|
||||||
S32 pos = dStrlen(fullpath);
|
S32 pos = dStrlen(fullpath);
|
||||||
fullpath[pos] = '/';
|
fullpath[pos - 1] = '/';
|
||||||
fullpath[pos + 1] = '\0';
|
fullpath[pos] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dump the directories.
|
// Dump the directories.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue