Merge branch 'development' of https://github.com/GarageGames/Torque3D into memberMess

# Conflicts:
#	Engine/source/console/consoleFunctions.cpp
This commit is contained in:
Azaezel 2018-03-28 15:42:34 -05:00
commit 28e509af1a
158 changed files with 2954 additions and 709 deletions

View file

@ -144,7 +144,7 @@ INT CreateMiniDump( LPEXCEPTION_POINTERS ExceptionInfo)
//copy over the pdb file
char pdbName[1024];
dStrcpy(pdbName, exeName);
dStrcpy(pdbName, exeName, 1024);
dStrncat(pdbName, ".pdb", 4);
dSprintf(fromFile, 2048, "%s/%s", Platform::getCurrentDirectory(), pdbName );
dSprintf(fileName, 2048, "%s/%s", crashPath, pdbName );

View file

@ -142,7 +142,7 @@ static UINT_PTR CALLBACK FolderHookProc(HWND hdlg, UINT uMsg, WPARAM wParam, LPA
#ifdef UNICODE
convertUTF16toUTF8(buf, filePath);
#else
dStrcpy( filePath, buf );
dStrcpy( filePath, buf, MAX_PATH );
#endif
// [tom, 12/8/2006] Hack to remove files from the list because
@ -333,8 +333,8 @@ bool FileDialog::Execute()
char pszFile[MAX_PATH];
char pszFilter[1024];
char pszFileTitle[MAX_PATH];
dStrcpy( pszFile, mData.mDefaultFile );
dStrcpy( pszFilter, mData.mFilters );
dStrcpy( pszFile, mData.mDefaultFile, MAX_PATH );
dStrcpy( pszFilter, mData.mFilters, 1024 );
const char* pszInitialDir = mData.mDefaultPath;
const char* pszTitle = mData.mTitle;
@ -447,7 +447,7 @@ bool FileDialog::Execute()
convertUTF16toUTF8DoubleNULL( (UTF16*)pszFile, (UTF8*)pszResult, sizeof(pszResult));
#else
if(pszFileTitle[0] || ! ( mData.mStyle & FileDialogData::FDS_OPEN && mData.mStyle & FileDialogData::FDS_MULTIPLEFILES ))
dStrcpy(pszResult,pszFile);
dStrcpy(pszResult,pszFile,MAX_PATH);
else
{
// [tom, 1/4/2007] pszResult is a double-NULL terminated, NULL separated list in this case so we can't just dSstrcpy()
@ -614,7 +614,7 @@ bool FileDialog::setDefaultPath( void *object, const char *index, const char *da
// Copy and Backslash the path (Windows dialogs are VERY picky about this format)
static char szPathValidate[512];
dStrcpy( szPathValidate, data );
dStrcpy( szPathValidate, data, 512 );
Platform::makeFullPathName( data,szPathValidate, sizeof(szPathValidate));
backslash( szPathValidate );

View file

@ -1552,31 +1552,32 @@ const char* DInputDevice::getJoystickAxesString()
switch ( mObjInfo[i].mInst )
{
case SI_XAXIS:
dStrcat( buf, "\tX" );
dStrcat( buf, "\tX", 64 );
break;
case SI_YAXIS:
dStrcat( buf, "\tY" );
dStrcat( buf, "\tY", 64 );
break;
case SI_ZAXIS:
dStrcat( buf, "\tZ" );
dStrcat( buf, "\tZ", 64 );
break;
case SI_RXAXIS:
dStrcat( buf, "\tR" );
dStrcat( buf, "\tR", 64 );
break;
case SI_RYAXIS:
dStrcat( buf, "\tU" );
dStrcat( buf, "\tU", 64 );
break;
case SI_RZAXIS:
dStrcat( buf, "\tV" );
dStrcat( buf, "\tV", 64 );
break;
case SI_SLIDER:
dStrcat( buf, "\tS" );
dStrcat( buf, "\tS", 64 );
break;
}
}
char* returnString = Con::getReturnBuffer( dStrlen( buf ) + 1 );
dStrcpy( returnString, buf );
dsize_t returnLen = dStrlen(buf) + 1;
char* returnString = Con::getReturnBuffer(returnLen);
dStrcpy( returnString, buf, returnLen );
return( returnString );
}

View file

@ -56,7 +56,7 @@ bool dFileDelete(const char * name)
#ifdef UNICODE
convertUTF8toUTF16N( name, buf, buf.size );
#else
dStrcpy( buf, name );
dStrcpy( buf, name, buf.size );
#endif
backslash( buf );
@ -88,8 +88,8 @@ bool dFileRename(const char *oldName, const char *newName)
convertUTF8toUTF16N( oldName, oldf, oldf.size );
convertUTF8toUTF16N( newName, newf, newf.size );
#else
dStrcpy(oldf, oldName);
dStrcpy(newf, newName);
dStrcpy(oldf, oldName, oldf.size);
dStrcpy(newf, newName, newf.size);
#endif
backslash(oldf);
backslash(newf);
@ -106,7 +106,7 @@ bool dFileTouch(const char * name)
#ifdef UNICODE
convertUTF8toUTF16N( name, buf, buf.size );
#else
dStrcpy( buf, name );
dStrcpy( buf, name, buf.size );
#endif
backslash( buf );
@ -133,8 +133,8 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
convertUTF8toUTF16N( fromName, from, from.size );
convertUTF8toUTF16N( toName, to, to.size );
#else
dStrcpy( from, fromName );
dStrcpy( to, toName );
dStrcpy( from, fromName, from.size );
dStrcpy( to, toName, to.size );
#endif
backslash( from );
@ -168,7 +168,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
char* toDir = tempBuf;
Platform::makeFullPathName(fromDir + dStrlen(fromName) + (dStricmp(fromDir, fromName) ? 1 : 0), tempBuf, tempBuf.size, toName);
if(*(toDir + dStrlen(toDir) - 1) != '/')
dStrcat(toDir, "/");
dStrcat(toDir, "/", tempBuf.size);
forwardslash(toDir);
if (!Platform::createPath(toDir))
@ -191,8 +191,8 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
char* toFile = tempBuf;
Platform::makeFullPathName(fileInfo[i].pFullPath + dStrlen(fromName) + (dStricmp(fileInfo[i].pFullPath, fromName) ? 1 : 0), tempBuf, tempBuf.size, toName);
dStrcat(toFile, "/");
dStrcat(toFile, fileInfo[i].pFileName);
dStrcat(toFile, "/", tempBuf.size);
dStrcat(toFile, fileInfo[i].pFileName, tempBuf.size);
backslash(fromFile);
backslash(toFile);
@ -269,7 +269,7 @@ File::FileStatus File::open(const char *filename, const AccessMode openMode)
#ifdef UNICODE
convertUTF8toUTF16N( filename, fname, fname.size );
#else
dStrcpy(fname, filename);
dStrcpy(fname, filename, fname.size);
#endif
backslash( fname );
@ -678,7 +678,7 @@ bool Platform::getFileTimes(const char *filePath, FileTime *createTime, FileTime
#ifdef UNICODE
convertUTF8toUTF16N( filePath, fp, fp.size );
#else
dStrcpy( fp, filePath );
dStrcpy( fp, filePath, fp.size );
#endif
backslash( fp );
@ -833,7 +833,7 @@ bool Platform::setCurrentDirectory(StringTableEntry newDir)
#ifdef UNICODE
convertUTF8toUTF16N( newDir, buf, buf.size - 1 );
#else
dStrcpy( buf, newDir );
dStrcpy( buf, newDir, buf.size );
#endif
backslash( buf );
@ -948,7 +948,7 @@ bool Platform::isFile(const char *pFilePath)
#ifdef UNICODE
convertUTF8toUTF16N( pFilePath, buf, buf.size );
#else
dStrcpy( buf, pFilePath );
dStrcpy( buf, pFilePath, buf.size );
#endif
backslash( buf );
@ -987,7 +987,7 @@ S32 Platform::getFileSize(const char *pFilePath)
#ifdef UNICODE
convertUTF8toUTF16N( pFilePath, buf, buf.size );
#else
dStrcpy( buf, pFilePath );
dStrcpy( buf, pFilePath, buf.size );
#endif
backslash( buf );
@ -1024,7 +1024,7 @@ bool Platform::isDirectory(const char *pDirPath)
#ifdef UNICODE
convertUTF8toUTF16N( pDirPath, buf, buf.size );
#else
dStrcpy( buf, pDirPath );
dStrcpy( buf, pDirPath, buf.size );
#endif
backslash( buf );
@ -1071,8 +1071,8 @@ bool Platform::isSubDirectory(const char *pParent, const char *pDir)
convertUTF8toUTF16N( fileName, file, file.size );
convertUTF8toUTF16N( pDir, dir, dir.size );
#else
dStrcpy( file, fileName );
dStrcpy( dir, pDir );
dStrcpy( file, fileName, file.size );
dStrcpy( dir, pDir, dir.size );
#endif
backslash( file );
@ -1256,7 +1256,7 @@ bool Platform::hasSubDirectory(const char *pPath)
// Compose our search string - Format : ([path]/[subpath]/*)
char trail = pPath[ dStrlen(pPath) - 1 ];
if( trail == '/' )
dStrcpy( searchBuf, pPath );
dStrcpy( searchBuf, pPath, 1024 );
else
dSprintf(searchBuf, 1024, "%s/*", pPath );

View file

@ -83,8 +83,9 @@ void installRedBookDevices()
if(::GetDriveTypeA(str) == DRIVE_CDROM)
{
Win32RedBookDevice * device = new Win32RedBookDevice;
device->mDeviceName = new char[dStrlen(str) + 1];
dStrcpy(device->mDeviceName, str);
dsize_t deviceNameLen = dStrlen(str) + 1;
device->mDeviceName = new char[deviceNameLen];
dStrcpy(device->mDeviceName, str, deviceNameLen);
RedBook::installDevice(device);
}

View file

@ -606,7 +606,7 @@ const char* Platform::getLoginPassword()
if ( RegQueryValueEx( regKey, dT("LoginPassword"), NULL, NULL, buf, &size ) == ERROR_SUCCESS )
{
returnString = Con::getReturnBuffer( size + 1 );
dStrcpy( returnString, (const char*) buf );
dStrcpy( returnString, (const char*) buf, size + 1 );
}
RegCloseKey( regKey );