fix getDirectoryList

used dStrcat (note: not dStrncat, so there the buffer destination size *is* the third var)
This commit is contained in:
AzaezelX 2023-03-11 12:48:57 -06:00
parent b257ac3d1e
commit 4572a0c774

View file

@ -489,9 +489,7 @@ DefineEngineFunction(getDirectoryList, String, ( const char* path, S32 depth ),
// Append a trailing backslash if it's not present already.
if (fullpath[dStrlen(fullpath) - 1] != '/')
{
S32 pos = dStrlen(fullpath);
fullpath[pos - 1] = '/';
fullpath[pos] = '\0';
dStrcat(fullpath, "/\0", 1024);
}
// Dump the directories.