mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Fix initializing return buffer.
Use "bufSize", not the "buf" itself.
This commit is contained in:
parent
1554ea6faf
commit
c23f3fbd9f
1 changed files with 2 additions and 2 deletions
|
|
@ -696,7 +696,7 @@ DefineEngineFunction(makeFullPath, String, ( const char* path, const char* cwd )
|
||||||
"@ingroup FileSystem")
|
"@ingroup FileSystem")
|
||||||
{
|
{
|
||||||
static const U32 bufSize = 512;
|
static const U32 bufSize = 512;
|
||||||
char *buf = Con::getReturnBuffer(buf);
|
char *buf = Con::getReturnBuffer(bufSize);
|
||||||
Platform::makeFullPathName(path, buf, bufSize, dStrlen(cwd) > 1 ? cwd : NULL);
|
Platform::makeFullPathName(path, buf, bufSize, dStrlen(cwd) > 1 ? cwd : NULL);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
@ -723,7 +723,7 @@ DefineEngineFunction(pathConcat, String, ( const char* path, const char* file),,
|
||||||
"@ingroup FileSystem")
|
"@ingroup FileSystem")
|
||||||
{
|
{
|
||||||
static const U32 bufSize = 1024;
|
static const U32 bufSize = 1024;
|
||||||
char *buf = Con::getReturnBuffer(buf);
|
char *buf = Con::getReturnBuffer(bufSize);
|
||||||
Platform::makeFullPathName(file, buf, bufSize, path);
|
Platform::makeFullPathName(file, buf, bufSize, path);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue