Missed a couple +1s here and there

This commit is contained in:
Glenn Smith 2018-03-07 00:44:28 -05:00
parent a94e0c6d81
commit 751ccae12d
7 changed files with 17 additions and 18 deletions

View file

@ -833,7 +833,7 @@ void SimXMLDocument::setObjectAttributes(const char* objectID)
continue;
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))
continue;
@ -873,7 +873,7 @@ void SimXMLDocument::setObjectAttributes(const char* objectID)
// continue;
// 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))
// continue;

View file

@ -2176,8 +2176,8 @@ bool expandPath(char* pDstPath, U32 size, const char* pSrcPath, const char* pWor
}
// Format the output path.
dStrcat(pathBuffer, "/", sizeof(pathBuffer) - 1 - strlen(pathBuffer));
dStrcat(pathBuffer, pSrc, sizeof(pathBuffer) - 1 - strlen(pathBuffer));
dStrncat(pathBuffer, "/", sizeof(pathBuffer) - 1 - strlen(pathBuffer));
dStrncat(pathBuffer, pSrc, sizeof(pathBuffer) - 1 - strlen(pathBuffer));
// Are we ensuring the trailing slash?
if (ensureTrailingSlash)

View file

@ -967,10 +967,10 @@ void PersistenceManager::updateToken( const U32 lineNumber, const U32 linePositi
// Build the new line with the
// preString + newValue + postString
dStrcat(newLine, preString, newLineLen);
dStrcat(newLine, preString, newLineLen + 1);
if ( newValue )
dStrcat(newLine, newValue, newLineLen);
dStrcat(newLine, postString, newLineLen);
dStrcat(newLine, newValue, newLineLen + 1);
dStrcat(newLine, postString, newLineLen + 1);
// Clear our existing line
if (mLineBuffer[lineNumber])