mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Missed a couple +1s here and there
This commit is contained in:
parent
a94e0c6d81
commit
751ccae12d
7 changed files with 17 additions and 18 deletions
|
|
@ -908,7 +908,7 @@ ConsoleFunction(echoThru, const char*, 2, 0, "(string passthru, string text...)"
|
||||||
char *ret = Con::getReturnBuffer(len + 1);
|
char *ret = Con::getReturnBuffer(len + 1);
|
||||||
ret[0] = 0;
|
ret[0] = 0;
|
||||||
for(i = 2; i < argc; i++)
|
for(i = 2; i < argc; i++)
|
||||||
dStrcat(ret, argv[i], len);
|
dStrcat(ret, argv[i], len + 1);
|
||||||
|
|
||||||
Con::printf("%s -- [%s]", ret, argv[1].getStringValue());
|
Con::printf("%s -- [%s]", ret, argv[1].getStringValue());
|
||||||
ret[0] = 0;
|
ret[0] = 0;
|
||||||
|
|
@ -928,7 +928,7 @@ ConsoleFunction(warnThru, const char*, 2, 0, "(string passthru, string text...)"
|
||||||
char *ret = Con::getReturnBuffer(len + 1);
|
char *ret = Con::getReturnBuffer(len + 1);
|
||||||
ret[0] = 0;
|
ret[0] = 0;
|
||||||
for(i = 2; i < argc; i++)
|
for(i = 2; i < argc; i++)
|
||||||
dStrcat(ret, argv[i], len);
|
dStrcat(ret, argv[i], len + 1);
|
||||||
|
|
||||||
Con::warnf("%s -- [%s]", ret, argv[1].getStringValue());
|
Con::warnf("%s -- [%s]", ret, argv[1].getStringValue());
|
||||||
ret[0] = 0;
|
ret[0] = 0;
|
||||||
|
|
@ -948,7 +948,7 @@ ConsoleFunction(errorThru, const char*, 2, 0, "(string passthru, string text...)
|
||||||
char *ret = Con::getReturnBuffer(len + 1);
|
char *ret = Con::getReturnBuffer(len + 1);
|
||||||
ret[0] = 0;
|
ret[0] = 0;
|
||||||
for(i = 2; i < argc; i++)
|
for(i = 2; i < argc; i++)
|
||||||
dStrcat(ret, argv[i], len);
|
dStrcat(ret, argv[i], len + 1);
|
||||||
|
|
||||||
Con::errorf("%s -- [%s]", ret, argv[1].getStringValue());
|
Con::errorf("%s -- [%s]", ret, argv[1].getStringValue());
|
||||||
ret[0] = 0;
|
ret[0] = 0;
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ DefineEngineFunction(filterString, const char *, (const char* baseString, const
|
||||||
replaceStr = gBadWordFilter->getDefaultReplaceStr();
|
replaceStr = gBadWordFilter->getDefaultReplaceStr();
|
||||||
|
|
||||||
char *ret = Con::getReturnBuffer(dStrlen(baseString) + 1);
|
char *ret = Con::getReturnBuffer(dStrlen(baseString) + 1);
|
||||||
dStrcpy(ret, baseString, dStrlen(baseString));
|
dStrcpy(ret, baseString, dStrlen(baseString) + 1);
|
||||||
gBadWordFilter->filterString(ret, replaceStr);
|
gBadWordFilter->filterString(ret, replaceStr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -833,7 +833,7 @@ void SimXMLDocument::setObjectAttributes(const char* objectID)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
FrameTemp<char> valCopy( dStrlen( val ) + 1 );
|
FrameTemp<char> valCopy( dStrlen( val ) + 1 );
|
||||||
dStrcpy( (char *)valCopy, val, dStrlen(val) + 1 );
|
dStrcpy( (char *)valCopy, val, valCopy.size() );
|
||||||
|
|
||||||
if (!pObject->writeField(itr->pFieldname, valCopy))
|
if (!pObject->writeField(itr->pFieldname, valCopy))
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -873,7 +873,7 @@ void SimXMLDocument::setObjectAttributes(const char* objectID)
|
||||||
// continue;
|
// continue;
|
||||||
|
|
||||||
// FrameTemp<char> valCopy( dStrlen( val ) + 1 );
|
// FrameTemp<char> valCopy( dStrlen( val ) + 1 );
|
||||||
// dStrcpy( (char *)valCopy, val, dStrlen(val) + 1 );
|
// dStrcpy( (char *)valCopy, val, valCopy.size() );
|
||||||
|
|
||||||
// if (!pObject->writeField(itr->pFieldname, valCopy))
|
// if (!pObject->writeField(itr->pFieldname, valCopy))
|
||||||
// continue;
|
// continue;
|
||||||
|
|
|
||||||
|
|
@ -2176,8 +2176,8 @@ bool expandPath(char* pDstPath, U32 size, const char* pSrcPath, const char* pWor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Format the output path.
|
// Format the output path.
|
||||||
dStrcat(pathBuffer, "/", sizeof(pathBuffer) - 1 - strlen(pathBuffer));
|
dStrncat(pathBuffer, "/", sizeof(pathBuffer) - 1 - strlen(pathBuffer));
|
||||||
dStrcat(pathBuffer, pSrc, sizeof(pathBuffer) - 1 - strlen(pathBuffer));
|
dStrncat(pathBuffer, pSrc, sizeof(pathBuffer) - 1 - strlen(pathBuffer));
|
||||||
|
|
||||||
// Are we ensuring the trailing slash?
|
// Are we ensuring the trailing slash?
|
||||||
if (ensureTrailingSlash)
|
if (ensureTrailingSlash)
|
||||||
|
|
|
||||||
|
|
@ -967,10 +967,10 @@ void PersistenceManager::updateToken( const U32 lineNumber, const U32 linePositi
|
||||||
|
|
||||||
// Build the new line with the
|
// Build the new line with the
|
||||||
// preString + newValue + postString
|
// preString + newValue + postString
|
||||||
dStrcat(newLine, preString, newLineLen);
|
dStrcat(newLine, preString, newLineLen + 1);
|
||||||
if ( newValue )
|
if ( newValue )
|
||||||
dStrcat(newLine, newValue, newLineLen);
|
dStrcat(newLine, newValue, newLineLen + 1);
|
||||||
dStrcat(newLine, postString, newLineLen);
|
dStrcat(newLine, postString, newLineLen + 1);
|
||||||
|
|
||||||
// Clear our existing line
|
// Clear our existing line
|
||||||
if (mLineBuffer[lineNumber])
|
if (mLineBuffer[lineNumber])
|
||||||
|
|
|
||||||
|
|
@ -2625,8 +2625,8 @@ DefineConsoleMethod( GuiEditCtrl, getSelectionGlobalBounds, const char*, (), , "
|
||||||
RectI bounds = object->getSelectionGlobalBounds();
|
RectI bounds = object->getSelectionGlobalBounds();
|
||||||
String str = String::ToString( "%i %i %i %i", bounds.point.x, bounds.point.y, bounds.extent.x, bounds.extent.y );
|
String str = String::ToString( "%i %i %i %i", bounds.point.x, bounds.point.y, bounds.extent.x, bounds.extent.y );
|
||||||
|
|
||||||
char* buffer = Con::getReturnBuffer( str.length() );
|
char* buffer = Con::getReturnBuffer( str.size() );
|
||||||
dStrcpy( buffer, str.c_str(), str.length() );
|
dStrcpy( buffer, str.c_str(), str.size() );
|
||||||
|
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,8 +158,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
|
|
||||||
Platform::clearExcludedDirectories();
|
Platform::clearExcludedDirectories();
|
||||||
|
|
||||||
S32 tempBufSize = to.size * 3 + MAX_PATH * 3;
|
TempAlloc< char > tempBuf( to.size * 3 + MAX_PATH * 3 );
|
||||||
TempAlloc< char > tempBuf( tempBufSize );
|
|
||||||
|
|
||||||
// Create all the directories.
|
// Create all the directories.
|
||||||
for (S32 i = 0; i < directoryInfo.size(); i++)
|
for (S32 i = 0; i < directoryInfo.size(); i++)
|
||||||
|
|
@ -169,7 +168,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
char* toDir = tempBuf;
|
char* toDir = tempBuf;
|
||||||
Platform::makeFullPathName(fromDir + dStrlen(fromName) + (dStricmp(fromDir, fromName) ? 1 : 0), tempBuf, tempBuf.size, toName);
|
Platform::makeFullPathName(fromDir + dStrlen(fromName) + (dStricmp(fromDir, fromName) ? 1 : 0), tempBuf, tempBuf.size, toName);
|
||||||
if(*(toDir + dStrlen(toDir) - 1) != '/')
|
if(*(toDir + dStrlen(toDir) - 1) != '/')
|
||||||
dStrcat(toDir, "/", tempBufSize);
|
dStrcat(toDir, "/", tempBuf.size);
|
||||||
forwardslash(toDir);
|
forwardslash(toDir);
|
||||||
|
|
||||||
if (!Platform::createPath(toDir))
|
if (!Platform::createPath(toDir))
|
||||||
|
|
@ -192,8 +191,8 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
|
|
||||||
char* toFile = tempBuf;
|
char* toFile = tempBuf;
|
||||||
Platform::makeFullPathName(fileInfo[i].pFullPath + dStrlen(fromName) + (dStricmp(fileInfo[i].pFullPath, fromName) ? 1 : 0), tempBuf, tempBuf.size, toName);
|
Platform::makeFullPathName(fileInfo[i].pFullPath + dStrlen(fromName) + (dStricmp(fileInfo[i].pFullPath, fromName) ? 1 : 0), tempBuf, tempBuf.size, toName);
|
||||||
dStrcat(toFile, "/", tempBufSize);
|
dStrcat(toFile, "/", tempBuf.size);
|
||||||
dStrcat(toFile, fileInfo[i].pFileName, tempBufSize);
|
dStrcat(toFile, fileInfo[i].pFileName, tempBuf.size);
|
||||||
|
|
||||||
backslash(fromFile);
|
backslash(fromFile);
|
||||||
backslash(toFile);
|
backslash(toFile);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue