mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
* BugFix: Correct non-constant array allocations in the POSIX case insensitivity code.
This commit is contained in:
parent
497a94f884
commit
444c9dcf41
2 changed files with 14 additions and 6 deletions
|
|
@ -1286,7 +1286,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
|||
{
|
||||
#ifdef TORQUE_POSIX_PATH_CASE_INSENSITIVE
|
||||
dsize_t pathLength = dStrlen(path);
|
||||
char caseSensitivePath[pathLength + 1];
|
||||
char* caseSensitivePath = new char[pathLength + 1];
|
||||
|
||||
// Load path into temporary buffer
|
||||
dMemcpy(caseSensitivePath, path, pathLength);
|
||||
|
|
@ -1298,6 +1298,10 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
|||
|
||||
bool retVal = recurseDumpDirectories(caseSensitivePath, "", directoryVector, -1, depth, noBasePath);
|
||||
clearExcludedDirectories();
|
||||
|
||||
#ifdef TORQUE_POSIX_PATH_CASE_INSENSITIVE
|
||||
delete[] caseSensitivePath;
|
||||
#endif
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue